Description Usage Arguments Value
This function will perform first-stage moderated mediation, using the 'lavaan' package. It uses bias-corrected bootstrap resampling for the confidence intervals.
1 |
iv |
The name of the independent variable, as a character string. |
dv |
The name of the dependent variable, as a character string. |
med |
The name of the mediator, as a character string. |
mod |
The name of the moderator, as a character string. If the moderator is numeric with only 0s and 1s, it will return the simple indirect effects at the values of 0 and 1; if it is numeric otherwise, it will return the simple indirect effects at a standard deviation below the mean, a standard deviation above the mean, and at the mean. |
data |
The data frame with the relevant variables. |
samples |
The number of bootstrap resamples. Defaults to 5000. |
Coefficients, standard errors, z-values, p-values, and confidence intervals for all estimated parameters. The indirect effects will not return standard errors, z-values, or p-values. The labels for each parameter estimate match the labels provided by Hayes (2015), An Index and Test of Linear Moderated Mediation, in Multivariate Behavioral Research.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.