Description Usage Arguments Value
View source: R/two_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 2. predictive variable names |
graph_label_name |
vector of length 3 or function. Vector should be passed in the form of c(response_var, predict_var1, predict_var2). Function should be passed as a switch function that return the label based on the name passed (e.g., a switch function) |
cateogrical_var |
list. use the form list(var_name1 = c(upper_bound1, lower_bound1), [var_name2 = c(upper_bound2, lower_bound2]) |
y_lim |
vector of length 2. c(lower_limit, upper_limit) |
plot_color |
logical. default as F. Set to T if you want to plot in color |
debug |
ingore this parameter |
ggplot object. two-way interaction plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.