R/ggcoefstats.R
ggcoefstats.Rd
Model coefficients for fitted models with the model summary as a caption.
ggcoefstats(x, output = "plot", scales = NULL, conf.method = "Wald", p.kr = TRUE, coefficient.type = "beta", effsize = "eta", partial = TRUE, nboot = 500, point.color = "blue", point.size = 3, point.shape = 16, conf.int = TRUE, conf.level = 0.95, se.type = "nid", k = 3, k.caption.summary = 0, exclude.intercept = TRUE, exponentiate = FALSE, errorbar.color = "black", errorbar.height = 0, errorbar.linetype = "solid", errorbar.size = 0.5, vline = TRUE, vline.color = "black", vline.linetype = "dashed", vline.size = 1, sort = "none", xlab = "regression coefficient", ylab = "term", title = NULL, subtitle = NULL, stats.labels = TRUE, caption.summary = TRUE, stats.label.size = 3, stats.label.fontface = "bold", stats.label.color = NULL, label.r = 0.15, label.size = 0.25, label.box.padding = 1, label.label.padding = 0.25, label.point.padding = 0.5, label.segment.color = "grey50", label.segment.size = 0.5, label.segment.alpha = NULL, label.min.segment.length = 0.5, label.force = 1, label.max.iter = 2000, label.nudge.x = 0, label.nudge.y = 0, label.xlim = c(NA, NA), label.ylim = c(NA, NA), label.direction = "y", package = "RColorBrewer", palette = "Dark2", direction = 1, ggtheme = ggplot2::theme_bw(), ggstatsplot.layer = TRUE, ...)
x  A model object to be tidied with 

output  Character describing the expected output from this function:

scales  scales on which to report the variables: for random effects, the choices are ‘"sdcor"’ (standard deviations and correlations: the default if 
conf.method  Character describing method for computing confidence
intervals (for more, see 
p.kr  Logical, if 
coefficient.type  Relevant only for ordinal regression models ( 
effsize  Character describing the effect size to be displayed: 
partial  Logical that decides if partial etasquared or omegasquared
are returned (Default: 
nboot  Number of bootstrap samples for confidence intervals for partial
etasquared and omegasquared (Default: 
point.color  Character describing color for the point (Default:

point.size  Numeric specifying size for the point (Default: 
point.shape  Numeric specifying shape to draw the points (Default: 
conf.int  Logical. Decides whether to display confidence intervals as
error bars (Default: 
conf.level  Numeric deciding level of confidence intervals (Default:

se.type  Character specifying the method used to compute standard
standard errors for quantile regression (Default: 
k  Number of decimal places expected for results displayed in labels. 
k.caption.summary  Number of decimal places expected for results displayed in captions. 
exclude.intercept  Logical that decides whether the intercept should be
excluded from the plot (Default: 
exponentiate  If 
errorbar.color  Character deciding color of the error bars (Default:

errorbar.height  Numeric specifying the height of the error bars
(Default: 
errorbar.linetype  Line type of the error bars (Default: 
errorbar.size  Numeric specifying the size of the error bars (Default:

vline  Decides whether to display a vertical line (Default: 
vline.color  Character specifying color of the vertical line (Default:

vline.linetype  Character specifying line type of the vertical line
(Default: 
vline.size  Numeric specifying the size of the vertical line (Default:

sort  If 
xlab  Label for 
ylab  Label for 
title  The text for the plot title. 
subtitle  The text for the plot subtitle. 
stats.labels  Logical. Decides whether the statistic and pvalues for
each coefficient are to be attached to each dot as a text label using

caption.summary  Logical. Decides whether the model summary should be
displayed as a cation to the plot (Default: 
stats.label.size, stats.label.fontface, stats.label.color  Aesthetics for
the labels. Defaults: 
label.r,  Radius of rounded corners, as unit or number. Defaults to

label.size  Size of label border, in mm. Defaults to 
label.box.padding  Amount of padding around bounding box, as number.
Defaults to 
label.label.padding  Amount of padding around label, as number.
Defaults to 
label.point.padding  Amount of padding around labeled point, as
number. Defaults to 
label.segment.color  Color of the line segment (Default: 
label.segment.size  Width of line segment connecting the data point to
the text label, in mm. Defaults to 
label.segment.alpha  Transparency of the line segment. Defaults to the same transparency as the text. 
label.min.segment.length  Skip drawing segments shorter than this.
Defaults to 
label.force  Force of repulsion between overlapping text labels.
Defaults to 
label.max.iter  Maximum number of iterations to try to resolve
overlaps. Defaults to 
label.nudge.x, label.nudge.y  Horizontal and vertical adjustments to
nudge the starting position of each text label. Defaults to 
label.xlim, label.ylim  Limits for the x and y axes. Text labels will be
constrained to these limits. By default, text labels are constrained to the
entire plot area. Defaults to 
label.direction  Character ( 
package  Name of package from which the palette is desired as string or symbol. 
palette  Name of palette as string or symbol. 
direction  Either 
ggtheme  A function, 
ggstatsplot.layer  Logical that decides whether 
…  Extra arguments to pass to 
Plot with the regression coefficients' point estimates as dots with confidence interval whiskers.
https://cran.rproject.org/package=ggstatsplot/vignettes/ggcoefstats.html
set.seed(123) ggcoefstats(x = lm(formula = mpg ~ cyl * am, data = mtcars))