View source: R/mvregmed.lavaan.dat.R
mvregmed.lavaan.dat | R Documentation |
Set up data to input to lavaan structural equation model (sem)
mvregmed.lavaan.dat(x, mediator, y, max.cor=0.99)
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 |
Use the function regmed.dat.check to standardize all variables and subset to subjects without missing data
A dataframe with updated x, mediator, and y
Daniel Schaid and Jason Sinnwell
Schaid DS, Dikilitas O, Sinnwell JP, Kullo I (2022). Penalized mediation models for multivariate data. Genet Epidemiol 46:32-50.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.