mplus2lavaan.modelSyntax: Convert Mplus model syntax to lavaan

Description Usage Arguments Value Author(s) See Also Examples

View source: R/ctr_mplus2lavaan.R

Description

Converts Mplus model syntax into lavaan model syntax.

Usage

1

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.

Value

A character string of converted lavaan model syntax.

Author(s)

Michael Hallquist

See Also

mplus2lavaan

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
syntax <- '
    f1 BY x1*1 x2 x3;
    x1 WITH x2;
    x3 (1);
    x2 (1);
'
lavSyntax <- mplus2lavaan.modelSyntax(syntax)
cat(lavSyntax)

## End(Not run)

Example output

This is lavaan 0.5-23.1097
lavaan is BETA software! Please report any bugs.
f1 =~ start(1)*x1 + x2 + x3
x1 ~~ x2
x3 ~~ .con1*x3
x2 ~~ .con1*x2

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