Description Usage Arguments Examples
This function returns the code to create a simple mediation triangle,
as well as the basic diagram using the diagram
library.
1 |
model1 |
The saved regression model of |
model2 |
The saved regression model of |
model3 |
The saved regression model of |
y |
The dependent variable from your mediation. |
x |
The x variable from your mediation. |
m |
The mediator from your mediation. |
df |
The dataframe containing the y, x, m columns. |
1 2 3 4 5 | draw.med(saved$model1, saved$model2, saved$model3)
Note in this example saved is the name of the model saved from mediation1.
You can include any form of model names that you have saved from \code{lm()}.
You can also type \code{draw.med} in your console to get this code and edit
the diagram parameters to your liking.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.