Learn R Programming

lavaan (version 0.6-16)

mplus2lavaan.modelSyntax: Convert Mplus model syntax to lavaan

Description

Converts Mplus model syntax into lavaan model syntax.

Usage

mplus2lavaan.modelSyntax(syntax)

Value

A character string of converted lavaan model syntax.

Arguments

syntax

A character vector containing Mplus model syntax to be converted to lavaan model syntax. Note that parsing Mplus syntax often requires correct usage of newline characters. If syntax is a vector of multiple strings, these will be joined with newlines prior to conversion. Alternatively, \n characters can be included inline in syntax.

Author

Michael Hallquist

See Also

mplus2lavaan

Examples

Run this code
if (FALSE) {
syntax <- '
    f1 BY x1*1 x2 x3;
    x1 WITH x2;
    x3 (1);
    x2 (1);
'
lavSyntax <- mplus2lavaan.modelSyntax(syntax)
cat(lavSyntax)
}

Run the code above in your browser using DataLab