Class SemLavaanRenderer
java.lang.Object
edu.cmu.tetrad.sem.SemLavaanRenderer
This class provides functionality for rendering a parameterized structural equation model (SEM)
into lavaan syntax. Lavaan is an R package for structural equation modeling.
The syntax can include intercepts, variances, covariances, and regression paths.
It supports options to fix parameters or include starting values.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringsemImToLavaan(SemIm semIm) Converts a SemIm (parameterized SEM) into lavaan syntax (.lav) using default configurations.static StringsemImToLavaan(SemIm semIm, boolean includeIntercepts, boolean includeVariances, boolean includeCovariances, boolean fixParameters) Converts a SemIm (parameterized Structural Equation Model) into lavaan syntax (.lav) with advanced configuration options.
-
Method Details
-
semImToLavaan
Converts a SemIm (parameterized SEM) into lavaan syntax (.lav) using default configurations.- Parameters:
semIm- The structural equation model (SEM) representation to be converted into lavaan syntax.- Returns:
- A String representation of the SEM model in lavaan syntax.
-
semImToLavaan
public static String semImToLavaan(SemIm semIm, boolean includeIntercepts, boolean includeVariances, boolean includeCovariances, boolean fixParameters) Converts a SemIm (parameterized Structural Equation Model) into lavaan syntax (.lav) with advanced configuration options.- Parameters:
semIm- The structural equation model (SEM) representation to be converted into lavaan syntax.includeIntercepts- A boolean flag indicating whether to include intercept terms in the output.includeVariances- A boolean flag specifying whether to include residual variances in the output.includeCovariances- A boolean flag specifying whether to include residual covariances in the output.fixParameters- If true, generates fixed values for the parameters; otherwise uses starting values in the lavaan syntax.- Returns:
- A String representation of the SEM model in lavaan syntax.
-