Description Usage Arguments Examples
View source: R/indirectmed2_moda.R
This function runs a serial mediation model with two mediators to calculate
the indirect effect, which will be used for bootstrapping
the confidence interval of the indirect effect. This function
is used in conjunction with the boot
function and is formatted to
work as a bootstrapped effect. This mediation model includes a
moderator on path A1.
1 | indirectmed2_moda(formula2, formula3, formula4, x, m1, m2, mod, df, random)
|
formula2 |
The formula for mediation for the a1 path, usually
|
formula3 |
The formula for mediation for the a2 and d21 paths, usually
|
formula4 |
The formula for mediation for the b1 and b2 paths, usually
|
x |
The column name for x in the data frame. |
m1 |
The column name for mediator 1 in the data frame. |
m2 |
The column name for mediator 2 in the data frame. |
mod |
The column name for the moderator in the data frame. |
random |
This variable is used to denote the data frame will be
randomize by row, as part of the |
data |
The dataframe where the columns from the formula can be found. |
1 2 | indirectmed2("Q31 ~ Q151*Q121", "Q41 ~ Q151 + Q31",
"Q11 ~ Q151 + Q31 + Q41", mtcars)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.