modmedXMY: Run Tests of Moderated-Mediation Pathways of Total X->Y...

View source: R/modmedXMY.R

modmedXMYR Documentation

Run Tests of Moderated-Mediation Pathways of Total X->Y Relationship

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 [X->Y] association.

Usage

modmedXMY(data, X, Y, Z, jSet, all = F)

Arguments

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 F)

Details

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.

Value

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


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