ModXY: Run Simple Test of how X->Y (or bYX) relationship is...

modXYR Documentation

Run Simple Test of how X->Y (or bYX) relationship is moderated by Z for Outcomes X

Description

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...**

Usage

modXY(data, Z, xSet, Y)

Arguments

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)

Details

This adjusts for degrees of freedom by using 'p' as a clustering variable in lavaan

Value

Will return the main effects of the outcomes, and their z-moderated effect


Dustin-Wood/funfield documentation built on July 20, 2023, 7:10 a.m.