Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mplus2lavaan

mplus to lavaan converter


Description

Read in an Mplus input file, convert it to lavaan syntax, and fit the model.

Usage

mplus2lavaan(inpfile, run = TRUE)

Arguments

inpfile

The filename (including a full path) of the Mplus input file. The data (as referred to in the Mplus input file) should be in the same directory as the Mplus input file.

run

Whether to run the specified Mplus input syntax (TRUE) or only to parse and convert the syntax (FALSE).

Value

A lavaan object with the fitted results of the Mplus model. The parsed and converted Mplus syntax is preserved in the @external slot of the lavaan object in the $mplus.inp element. If run is FALSE, a list of converted syntax is returned.

Author(s)

Michael Hallquist

See Also

Examples

## Not run: 
out <- mplus2lavaan("ex5.1.inp")
summary(out)

## End(Not run)

lavaan

Latent Variable Analysis

v0.6-10
GPL (>= 2)
Authors
Yves Rosseel [aut, cre] (<https://orcid.org/0000-0002-4129-4477>), Terrence D. Jorgensen [aut] (<https://orcid.org/0000-0001-5111-6773>), Nicholas Rockwood [aut] (<https://orcid.org/0000-0001-5931-183X>), Daniel Oberski [ctb], Jarrett Byrnes [ctb], Leonard Vanbrabant [ctb], Victoria Savalei [ctb], Ed Merkle [ctb], Michael Hallquist [ctb], Mijke Rhemtulla [ctb], Myrsini Katsikatsou [ctb], Mariska Barendse [ctb], Florian Scharf [ctb], Han Du [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.