modXY | 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 [Action->Likelihood] association. ** continue editing here...**
modXY(data, Z, xSet, Y)
data |
dataset in a PSI long format, preferably using within-situation deviated scores |
Z |
moderator variable (it will be standardized) |
xSet |
location of the set of variables that will be explored as moderated by Z (one at a time) |
Y |
the dependent variable (often "likelihood" - but not necessarily) |
This adjusts for degrees of freedom by using 'p' as a clustering variable in lavaan
Will return the main effects of the outcomes, and their z-moderated effect
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.