mplus2lavaan: mplus to lavaan converter

Description Usage Arguments Value Author(s) See Also Examples

View source: R/ctr_mplus2lavaan.R

Description

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

Usage

1
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

lavExport

Examples

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

## End(Not run)

lavaan documentation built on March 10, 2021, 5:05 p.m.

Related to mplus2lavaan in lavaan...