Set up a model statement (string formula) from mvregmed object for input to lavaan
mvregmed.lavaan.model(fit.edge, fit.mvregmed)Text string to define a model as input to sem
Output from mvregmed.edges
A mvregmed object, either from mvregmed.fit or from mvregmed.grid.bestfit
Daniel Schaid and Jason Sinnwell
Loop through all relationships determined important from mrregmed edges object, and create model statement for lavaan, while also specifying covariances pre-estimated by mvregmed. See vignette for examples. The summary method for lavaan supersedes the summary from the lavaan package by simplifying the output to only return the coefficient table, as the covariance estimates were fixd from mvregmed.
Schaid DS, Dikilitas O, Sinnwell JP, Kullo I (2022). Penalized mediation models for multivariate data. Genet Epidemiol 46:32-50.