Description Usage Arguments Examples
This function runs a complete serial mediation analysis with two mediators, similiar to model 6 in PROCESS by A. Hayes (2013). As part of the output, you will find data screening, all three models used in the traditional Baron and Kenny (1986) steps, total/direct/indirect effects, the z-score and p-value for the Aroian Sobel test, and the bootstrapped confidence interval for the indirect effect.
1 2 3 4 5 6 7 8 9 10 11 | mediation2(
y,
x,
m1,
m2,
cvs = NULL,
df,
with_out = T,
nboot = 1000,
conf_level = 0.95
)
|
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 mediator for your model. |
m2 |
The second mediator 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 |
nboot |
A numeric value indicating the number of bootstraps you would like to complete. |
conf_level |
A numeric value indicating the confidence interval width for the boostrapped confidence interval. |
1 2 3 | mediation2(y = "Q11", x = "Q151", m1 = "Q31", m2 = "Q41",
cvs = c("Q121"), df = mediation2_data, nboot = 1000, with_out = T,
conf_level = .95)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.