- data
a data object (a data frame or a data.table)
- iv_name
name of the binary independent variable
- dv_name
name of the dependent variable
- mod_name
name of the continuous moderator variable
- covariate_name
name of the variables to control for
- interaction_p_include
logical. Should the plot include a
p-value for the interaction term?
- iv_level_order
order of levels in the independent
variable for legend. By default, it will be set as levels of the
independent variable ordered using R's base function sort
.
- output
type of output (default = "reg_lines_plot").
Possible inputs: "interactions_pkg_results", "simple_effects_plot",
"jn_points", "regions", "reg_lines_plot"
- jitter_x_y_percent
horizontally and vertically jitter dots
by a percentage of the respective ranges of x and y values.
- jitter_x_percent
horizontally jitter dots by a percentage of the
range of x values
- jitter_y_percent
vertically jitter dots by a percentage of the
range of y values
- dot_alpha
opacity of the dots (0 = completely transparent,
1 = completely opaque). By default, dot_alpha = 0.5
- dot_size
size of the dots (default = 4)
- interaction_p_value_font_size
font size for the interaction
p value (default = 8)
- jn_point_label_add
logical. Should the labels for
Johnson-Neyman point labels be added to the plot? (default = TRUE)
- jn_point_font_size
font size for Johnson-Neyman point labels
(default = 8)
- jn_point_label_hjust
a vector of hjust values for
Johnson-Neyman point labels. By default, the hjust value will be 0.5 for
all the points.
- lines_at_mod_extremes
logical. Should vertical lines be
drawn at the observed extreme values of the moderator if those values
lie in siginificant region(s)?
(default = FALSE)
- interaction_p_vjust
By how much should the label for the
interaction p-value be adjusted vertically?
By default, interaction_p_vjust = -3
)
- plot_margin
margin for the plot
By default plot_margin = ggplot2::unit(c(75, 7, 7, 7), "pt")
- legend_position
position of the legend (default = "right").
If legend_position = "none"
, the legend will be removed.
- reg_line_types
types of the regression lines for the two levels
of the independent variable.
By default, reg_line_types = c("solid", "dashed")
- jn_line_types
types of the lines for Johnson-Neyman points.
By default, jn_line_types = c("solid", "solid")
- jn_line_thickness
thickness of the lines at Johnson-Neyman points
(default = 1.5)
- colors_for_iv
colors for the two values of the
independent variable (default = c("red", "blue"))
- sig_region_color
color of the significant region, i.e., range(s)
of the moderator variable for which simple effect of the independent
variable on the dependent variable is statistically significant.
- sig_region_alpha
opacity for sig_region_color
.
(0 = completely transparent, 1 = completely opaque).
By default, sig_region_alpha = 0.08
- nonsig_region_color
color of the non-significant region,
i.e., range(s) of the moderator variable for which simple effect of
the independent variable on the dependent variable is not
statistically significant.
- nonsig_region_alpha
opacity for nonsig_region_color
.
(0 = completely transparent, 1 = completely opaque).
By default, nonsig_region_alpha = 0.08
- x_axis_title
title of the x axis. By default, it will be set
as input for mod_name
. If x_axis_title = FALSE
, it will
be removed.
- y_axis_title
title of the y axis. By default, it will be set
as input for dv_name
. If y_axis_title = FALSE
, it will
be removed.
- legend_title
title of the legend. By default, it will be set
as input for iv_name
. If legend_title = FALSE
, it will
be removed.
- round_decimals_int_p_value
To how many digits after the
decimal point should the p value for the interaction term be
rounded? (default = 3)
- line_of_fit_thickness
thickness of the lines of fit (default = 1)
- round_jn_point_labels
To how many digits after the
decimal point should the jn point labels be rounded? (default = 2)