Creates lavaan
model strings from model matrices.
genModelString(
Lambda = NULL,
Phi = NULL,
Beta = NULL,
Psi = NULL,
Theta = NULL,
tau = NULL,
Alpha = NULL,
useReferenceIndicator = !is.null(Beta),
metricInvariance = NULL,
nGroups = 1
)
A list containing the following lavaan
model strings:
modelPop
population model
modelTrue
"true" analysis model freely estimating all non-zero parameters.
modelTrueCFA
similar to modelTrue
, but purely CFA based and thus omitting any regression relationships.
Factor loading matrix.
Factor correlation (or covariance) matrix. If NULL
, all factors are orthogonal.
Regression slopes between latent variables (all-y notation).
Variance-covariance matrix of latent residuals when Beta
is specified. If NULL
, a diagonal matrix is assumed.
Variance-covariance matrix of manifest residuals. If NULL
and Lambda
is not a square matrix, Theta
is diagonal so that the manifest variances are 1. If NULL
and Lambda
is square, Theta
is 0.
Intercepts. If NULL
and Alpha
is set, these are assumed to be zero.
Factor means. If NULL
and tau
is set, these are assumed to be zero.
Whether to identify factors in accompanying model strings by a reference indicator (TRUE
) or by setting their variance to 1 (FALSE
). When Beta
is defined, a reference indicator is used by default, otherwise the variance approach.
A list containing the factor indices for which the accompanying model strings should apply metric invariance labels, e.g. list(c(1, 2), c(3, 4))
to assume invariance for f1 and f2 as well as f3 and f4.
(defaults to 1) If > 1 and metricInvariance = TRUE
, group specific labels will be used in the measurement model.