medXMY | R Documentation |
This will run and extract single-mediator mediation models ('Model 1' in Wood, Harms, & Cho, 2023) for all measured potential mediators of the [X->Y] association.
medXMY(data, X, Y, jSet, all = F)
data |
dataset in a PSI long format |
X |
the initiating variable |
Y |
the dependent variable (often "likelihood" - but not necessarily) |
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
Note that this model is referred to as the 'Minimal EV Model' in Wood et al., 2023,
and will produce a simple mediational model that is equivalent to the common
c = a*b + c
formula found in mediational models, but using a different notation -
specifically B0_YX = B1_MX*B1_YM + B1_YX
.
The B0_YX is returned as a bit of a quality check. If the estimates, p values, etc, are not isn't the same across all cases, then this indicates that you did not get rid of cases with missing values, which is generally recommended.
Will return the normative forces along the mediational pathway, separately for each potential mediator.
Will also return a summary that can be used to quickly glance the estimates of indirect pathway and its statistical significance.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.