Usage
sjp.emm.int(fit, swapPredictors = FALSE, plevel = 0.05, title = NULL,
geom.colors = "Set1", axisTitle.x = NULL, axisTitle.y = NULL,
axisLabels.x = NULL, legendTitle = NULL, legendLabels = NULL,
showValueLabels = FALSE, valueLabel.digits = 2, showCI = FALSE,
breakTitleAt = 50, breakLegendTitleAt = 20, breakLegendLabelsAt = 20,
axisLimits.y = NULL, gridBreaksAt = NULL, printPlot = TRUE)
Arguments
fit
the fitted linear (mixed effect) model (lm
or lmer
),
including interaction terms. swapPredictors
if TRUE
, the grouping variable and predictor on
the x-axis are swapped.
plevel
Indicates at which p-value an interaction term is considered as significant,
i.e. at which p-level an interaction term will be considered for plotting. Default is
0.05 (5 percent), hence, non-significant interactions are excluded by default.
title
a default title used for the plots. Default value is NULL
, which means that each plot's title
includes the dependent variable as well as the names of the interaction terms.
geom.colors
A vector of color values.
axisTitle.x
a default title used for the x-axis. Default value is NULL
,
which means that each plot's x-axis uses the predictor's name as title.
axisTitle.y
a default title used for the y-axis. Default value is NULL
,
which means that each plot's y-axis uses the dependent variable's name as title.
axisLabels.x
Character vector with value labels of the repeated measure variable
that are used for labelling the x-axis.
legendTitle
Character vector with title of the diagram's legend. Default is
NULL
, so the name of the grouping variable is used as legend title.
legendLabels
Labels for the guide/legend. Default is NULL
, so the levels of
the grouping variable are used as legend labels.
showValueLabels
if TRUE
, value labels are plotted along the lines. Default is FALSE
.
valueLabel.digits
the amount of digits of the displayed value labels. Defaults to 2.
showCI
If TRUE
, a confidence region for the estimated marginal means
will be plotted.
breakTitleAt
Wordwrap for diagram's title. Determines how many chars of the title are
displayed in one line and when a line break is inserted. Default is 50
.
breakLegendTitleAt
Wordwrap for diagram legend title. Determines how many chars of the legend's title
are displayed in one line and when a line break is inserted.
breakLegendLabelsAt
Wordwrap for diagram legend labels. Determines how many chars of the legend labels are
displayed in one line and when a line break is inserted. Default is 20
.
axisLimits.y
A vector with two values, defining the lower and upper limit from the y-axis.
By default, this value is NULL
, i.e. axis limits will be calculated upon the
range of y-values.
gridBreaksAt
Sets the breaks on the y axis, i.e. at every n'th position a major
grid is being printed. Default is NULL
.
printPlot
If TRUE
(default), plots the results as graph. Use FALSE
if you don't
want to plot any graphs. In either case, the ggplot-object will be returned as value.