Learn R Programming

regmed (version 2.1.5)

mvregmed.lavaan.dat: Set up data to input to lavaan sem

Description

Set up data to input to lavaan structural equation model (sem)

Usage

mvregmed.lavaan.dat(x, mediator, y, max.cor=0.99)

Value

A dataframe with updated x, mediator, and y

Arguments

x

matrix of exposure variables

mediator

matrix of mediators

y

matrix of outcome variables

max.cor

maximum correlation within mediators, so that fitting is more robust

Author

Daniel Schaid and Jason Sinnwell

Details

Use the function regmed.dat.check to standardize all variables and subset to subjects without missing data

References

Schaid DS, Dikilitas O, Sinnwell JP, Kullo I (2022). Penalized mediation models for multivariate data. Genet Epidemiol 46:32-50.