modmedXMY | R Documentation |
This will run and extract single-mediator moderated-mediation models ('Model 1' in Wood, Harms, & Cho, 2023) for all measured potential mediators of the [X->Y] association.
modmedXMY(data, X, Y, Z, jSet, all = F)
data |
dataset in a PSI long format |
X |
the initiating variable |
Y |
the dependent variable (often "likelihood" - but not necessarily) |
Z |
moderator variable (it will be standardized) |
jSet |
location of the set of variables that will be explored as moderated by Z |
all |
include the full lavaan results for each variable (default to |
This adjusts for degrees of freedom by using 'p' as a clustering variable in lavaan
The general decomposition of indirect pathway is informed by Muller et al., 2005.
Will return the main effects of forces along the mediational pathway, and the z-moderation of each force.
Will also print out some summary sheets ('paths' and 'paths2') as a means of helping pull out key results
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.