graph_effect | R Documentation |
This function is intended to quickly graph a single set of predictions, given a model.
graph_effect(
model,
x,
fill = NULL,
facet = NULL,
facet2 = NULL,
continuous_x = FALSE,
colors = NULL
)
x |
the name of the variable that should be graphed on the x axis. |
fill |
the (optional) name of the variable that should be graphed as a fill. |
facet |
the (optional) name of the variable that should be graphed as a facet. |
facet2 |
the (optional) name of the variable that should be graphed as a second facet. |
continuous_x |
If true, a line graph will be created for any continuous variables, rather than bar graphs with predicted values at +1/-1 SD. |
colors |
An optional vector of colors for the bars and lines of graphs. |
m |
A linear model. Standard OLS or logistic regression will work. |
A ggplot line or bar graph.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.