interaction-plot | R Documentation |
Plots the mean of the response for two-way combinations of factors, thereby illustrating possible interactions.
interaction_plot(.data, .formula, interval = "conf.int")
.data |
A data frame |
.formula |
A formula of the form |
interval |
Either |
This is a recent addition to the package and is subject to change.
income$educf <- cut(income$educ, breaks=3)
income |> interaction_plot(inc ~ race + educf)
income |> interaction_plot(inc ~ race + educf, interval="conf.int")
income |> interaction_plot(inc ~ race + educf, interval="boxplot")
income |> interaction_plot(inc ~ race + educf, interval="none")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.