The function creates a three-way interaction plot. By default, it will create an interaction plot with -1 SD and +1 SD of the two continuous variables, or the two levels of the binary variables or dummy-coded multi-categorical variable
It has been superseded by interaction_plot
.
three_way_interaction_plot(
model,
interaction_term = NULL,
response_var_name = NULL,
predict_var1_name = NULL,
predict_var2_name = NULL,
predict_var3_name = NULL,
predict_var1_level = NULL,
predict_var2_level = NULL,
predict_var3_level = NULL,
predict_var1_level_name = NULL,
predict_var2_level_name = NULL,
predict_var3_level_name = NULL,
y_lim = NULL,
plot_color = FALSE,
return_plot_data = FALSE,
return_plot = FALSE,
verbose = TRUE,
print_plot = TRUE,
data = NULL
)
a regression model object from effect.
default is the first interaction term in the model. The term should be given explicitly if you want to plot other interaction terms.
The name of the response variable can be changed using this setting.
The name of the first predictor can be changed using this setting.
The name of the second predictor can be changed using this setting.
The name of the third predictor can be changed using this setting.
The default is -1 SD and +1 SD for a continuous variable, and it is the two levels for a binary variable. These can be changed using this setting.
The default is -1 SD and +1 SD for a continuous variable, and it is the two levels for a binary variable. These can be changed using this setting.
The default is -1 SD and +1 SD for a continuous variable, and it is the two levels for a binary variable. These can be changed using this setting.
The labels of the level can be change using this value (e.g., c('-1 SD','+1 SD')
). The order should be from the left to right on the x-axis.
The labels of the level can be change using this value (e.g., c('-1 SD','+1 SD')
). The order should be from the top to down on the legend.
The labels of the level can be change using this value (e.g., c('-1 SD','+1 SD')
). The order should be from the left to right on the facets.
the plot's upper and lower limit for the y-axis. Length of 2. Example: c(lower_limit, upper_limit)
default if FALSE
. Set to TRUE
if you want to plot in color
default is FALSE
. Set to TRUE
to return the plot data.
default is FALSE
. Set to TRUE
to return the plot.
deafult is TRUE
.
default is TRUE
. Set to TRUE
to print the plot.
Optional data.frame. Only used when it is not possible to extract data from the model object.
an object of class ggplot