Description Usage Arguments Value
View source: R/three_way_interaction_plot.R
This will create a three-way interaction plot. It uses the predict function on the lme object to get the values of the independent variable using the values of the independent variable that is 1 standard deviation above and below the mean.
1 2 3 4 5 6 7 8 9 10 |
data |
dataframe |
nlme_object |
lme object from 'nlme::lme' |
predict_var_name |
vector of length 3. the variables' name for the two-way interaction plot |
cateogrical_var |
list. use the form list(var_name1 = c(upper_bound1, lower_bound1), [var_name2 = c(upper_bound2, lower_bound2]) |
graph_label_name |
vector of length 3 or function. Vector should be passed in the form of c(response_var, predict_var1, predict_var2, predict_var3). Function should be passed as a switch function that return the label based on the name passed (e.g., a switch function) |
y_lim |
vector of two number. set the y_lim of the plot |
debug |
ingore this parameter |
plot_color |
logical. default as F. Set to T if you want to plot in color |
ggplot object. three-way interaction plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.