Description Usage Arguments Examples
This function runs a complete double two-way moderation analysis with two moderators, similiar to model 2 in PROCESS by A. Hayes (2013). As part of the output, you will find data screening, the overall model, and the simple slopes for X at each level of the moderator. X and M variables will be mean centered after data screening and before analysis to control for multicollinearity unless they are categorical.
1 | moderation2(y, x, m1, m2, cvs = NULL, df, with_out = T)
|
y |
The dependent variable column name from your dataframe. |
x |
The independent variable column name from your dataframe. This column will be treated as X in mediation or moderation models, please see diagrams online for examples. |
m1 |
The first moderator for your model. |
m2 |
The second moderator for your model. |
cvs |
The covariates you would like to include in the model.
Use a |
df |
The dataframe where the columns from the formula can be found. Note that only the columns used in the analysis will be data screened. |
with_out |
A logical value where you want to keep the outliers in
model |
1 2 3 | states = as.data.frame(state.x77)
moderation2(y = "Income", x = "Illiteracy", m1 = "Murder",
m2 = "Population", df = states)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.