View source: R/plot_mediate_plot.R
mediate_plot | R Documentation |
Create a plot for mediation analysis
mediate_plot(formula, data, method = "lm", ...)
formula |
A formula with y on the left side and the predictors on the right. The last variable entered will be plotted on the x-axis |
data |
The dataset |
method |
The fitted line. Defaults to "lm". |
... |
Other parameters passed to flexplot |
a plot showing the mediation effect
mediate_plot(weight.loss~motivation + health, data=exercise_data)
mediate_plot(weight.loss~motivation + therapy.type, data=exercise_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.