Show the default options used by the
lavaan() function. The
options can be changed by passing 'name = value' arguments to the
lavaan() function call, where they will be added to the '...'
Character. A character string holding an option name, or a character string vector holding multiple option names. All option names are converted to lower case.
If a single option is specified but not available, this value is returned.
Character. Adjust the option list for this mimic flag.
This is the full list of options that are accepted by the
function, organized in several sections:
Model features (always available):
TRUE, the means of the observed
variables enter the model. If
"default", the value is set based
on the user-specified model, and/or the values of other arguments.
FALSE, the intercepts of the
observed variables are fixed to zero.
FALSE, the intercepts of the latent
variables are fixed to zero.
TRUE, we set up the model
conditional on the exogenous ‘x’ covariates; the model-implied sample
statistics only include the non-x variables. If
exogenous ‘x’ variables are modeled jointly with the other variables, and
the model-implied statistics refect both sets of variables. If
"default", the value is set depending on the estimator, and
whether or not the model involves categorical endogenous variables.
TRUE, the exogenous ‘x’ covariates are
considered fixed variables and the means, variances and covariances of
these variables are fixed to their sample values. If
are considered random, and the means, variances and covariances are free
"default", the value is set depending on the mimic
TRUE, all covariances among
latent variables are set to zero.
TRUE, the metric of each latent variable
is determined by fixing their (residual) variances to 1.0. If
FALSE, the metric of each latent variable is determined by fixing
the factor loading of the first indicator to 1.0.
Currently only used if data is
"delta", the delta parameterization is used.
"theta", the theta parameterization is used.
Model features (only available for the
TRUE, the factor loading of the
first indicator is set to 1.0 for every latent variable.
TRUE, the residual variance (if
included) of an observed indicator is set to zero if it is the only
indicator of a latent variable.
TRUE, the residual variances and the
variances of exogenous latent variables are included in the model and
TRUE, the covariances of exogenous
latent variables are included in the model and set free.
TRUE, the covariances of dependent
variables (both observed and latent) are included in the model and set
TRUE, thresholds for limited dependent
variables are included in the model and set free.
TRUE, response scaling parameters
for limited dependent variables are included in the model and set free.
TRUE, all observed variables are
standardized before entering the analysis.
The default setting is
cases with missing values
are removed listwise from the data before the analysis starts. This is
only valid if the data are missing completely at random (MCAR).
Therefore, it may not be the optimal choice, but
it can be useful for a first run. If the estimator belongs to
the ML family, another option is
"direct"). This corresponds to the so-called full information
maximum likelihood approach (fiml), where we compute the likelihood
case by case, using all available data from that case. Note
that if the model contains exogenous observed covariates, and
fixed.x = TRUE (the default), all cases with any missing values
on these covariates will be deleted first. The option
"direct.x") is similar to
but does not delete any cases with missing values for the exogenous
covariates, even if
fixed.x = TRUE. (Note: all lavaan versions
< 0.6 used
"ml.x" instead of
If you wish to use multiple
imputation, you need to use an external package (eg. mice) to
generate imputed datasets, which can then be analyzed using
semList function. The semTools package contains
several functions to do this automatically. Another option (with
continuous data) is to use
"robust.two.stage". In this approach, we first estimate
the sample statistics (mean vector, variance-covariance matrix) using
an EM algorithm. Then, we use these estimated sample statistics as
input for a regular analysis (as if the data were complete). The
standard errors and test statistics
are adjusted correctly to reflect the two-step procedure. The
"robust.two.stage" option produces standard errors and
a test statistic that are robust against non-normality.
If (part of) the data is categorical, and the estimator is
from the (W)LS family, the only option (besides listwise deletion)
"pairwise". In this three-step approach, missingness is
only an issue in the first two steps. In the first step, we compute
thresholds (for categorical variables) and means or intercepts
(for continuous variables) using univariate information only.
In this step, we simply ignore
the missing values just like in mean(x, na.rm = TRUE). In the second
step, we compute polychoric/polyserial/pearson correlations using (only)
two variables at a time. Here we use pairwise deletion: we only keep
those observations for which both values are observed (not-missing).
And this may change from pair to pair.
By default, in the categorical case we use
conditional.x = TRUE.
Therefore, any cases
with missing values on the exogenous covariates will be deleted listwise
from the data first.
Finally, if the estimator is
"PML", the available options are
"doubly.robust". See the PML tutorial on the lavaan website for
more information about these approaches.
Data summary options:
TRUE, the sample covariance
matrix provided by the user is internally rescaled by multiplying it
with a factor (N-1)/N. If
"default", the value is set depending
on the estimator and the likelihood option: it is set to
maximum likelihood estimation is used and
Numeric. Small constant used for ridging. Only used if the sample covariance matrix is non positive definite.
Multiple group options:
A character vector. The user can specify which group (or factor) levels need to be selected from the grouping variable, and in which order. If missing, all grouping levels are selected, in the order as they appear in the data.
A vector of character strings. Only used in
a multiple group analysis. Can be one or more of the following:
"lv.covariances", specifying the pattern of equality
constraints across multiple groups.
A vector of character strings containing the labels of the parameters which should be free in all groups (thereby overriding the group.equal argument for some specific parameters).
TRUE, the group
frequencies are considered to be free parameters in the model. In this
case, a Poisson model is fitted to estimate the group frequencies. If
FALSE (the default), the group frequencies are fixed to their
The estimator to be used. Can be one of the
"ML" for maximum likelihood,
generalized least squares,
"WLS" for weighted least squares
(sometimes called ADF estimation),
"ULS" for unweighted least
"DWLS" for diagonally weighted least squares. These
are the main options that affect the estimation. For convenience, the
"ML" option can be extended as
The estimation will still be plain
"ML", but now
with robust standard errors and a robust (scaled) test statistic. For
"MLMVS", classic robust standard
errors are used (
errors are based on first-order derivatives
information = "first.order");
"MLR", ‘Huber-White’ robust standard errors are used
se="robust.huber.white"). In addition,
"MLM" will compute
a Satorra-Bentler scaled (mean adjusted) test statistic
"MLMVS" will compute a
mean and variance adjusted test statistic (Satterthwaite style)
"MLMV" will compute a mean
and variance adjusted test statistic (scaled and shifted)
compute a test statistic which is asymptotically
equivalent to the Yuan-Bentler T2-star test statistic
"WLSMV" imply the
estimator (not the
"WLS" estimator) with robust standard errors
and a mean or mean and variance adjusted test statistic. Estimators
"ULSMV" imply the
estimator with robust standard errors
and a mean or mean and variance adjusted test statistic.
Only relevant for ML estimation. If
"wishart", the wishart likelihood approach is used. In this
approach, the covariance matrix has been divided by N-1, and both
standard errors and test statistics are based on N-1.
"normal", the normal likelihood approach is used. Here,
the covariance matrix has been divided by N, and both standard errors
and test statistics are based on N. If
"default", it depends
on the mimic option: if
normal likelihood is used; otherwise, wishart likelihood is used.
Currently only used if estimator is MML.
"logit", a logit link is used for binary and ordered observed
"probit", a probit link is used. If
"default", it is currently set to
"probit" (but this may
"expected", the expected
information matrix is used (to compute the standard errors). If
"observed", the observed information matrix is used.
"first.order", the information matrix is based on the
outer product of the casewise scores. See also the options
further control. If
"default", the value is set depending
on the estimator, the missing argument, and the mimic option.
"structured" (the default), the
unrestricted (h1) information part of the (expected, first.order or
observed if h1 is used) information matrix is based on the structured,
or model-implied statistics (model-implied covariance matrix,
model-implied mean vector, etc.).
"unstructured", the unrestricted (h1) information part is
based on sample-based statistics (observed covariance matrix, observed
mean vector, etc.)
"hessian", the observed
information matrix is based on the hessian of the objective function.
"h1", an approximation is used that is based on
the observed information matrix of the unrestricted (h1) model.
"standard", conventional standard errors
are computed based on inverting the (expected, observed or first.order)
information matrix. If
"robust.sem", conventional robust
standard errors are computed. If
standard errors are computed based on the ‘mlr’ (aka pseudo ML,
"robust.huber.white" is used depending on the estimator,
the mimic option, and whether the data are complete or not.
"bootstrap", bootstrap standard errors are
computed using standard bootstrapping (unless Bollen-Stine bootstrapping
is requested for the test statistic; in this case bootstrap standard
errors are computed using model-based bootstrapping).
"none", no standard errors are computed.
"standard", a conventional chi-square test
is computed. If
"Satorra.Bentler", a Satorra-Bentler scaled test
statistic is computed. If
"Yuan.Bentler", a Yuan-Bentler scaled
test statistic is computed. If
test statistic is computed that is asymptotically equal to the
test statistic. If
"Satterthwaite", a mean and variance adjusted test statistic is
"scaled.shifted", an alternative mean and variance
adjusted test statistic is computed (as in Mplus version 6 or higher).
Bollen-Stine bootstrap is used to compute the bootstrap probability value
of the test statistic. If
"default", the value depends on the
values of other arguments.
Number of bootstrap draws, if bootstrapping is used.
FALSE, the model is not fit, and the
current starting values of the model parameters are preserved.
A list containing control parameters passed to
the external optimizer. By default, lavaan uses
See the manpage of
nlminb for an overview of the control
parameters. If another (external) optimizer is selected, see the
manpage for that optimizer to see the possible control parameters.
Character. The optimizer that should be
used. For unconstrained optimization (the model syntax
does not include any "==", ">" or "<" operators),
the available options are
"nlminb" (the default),
"L-BFGS-B". For constrained
optimization, the only available option is
Categorical estimation options:
A numeric vector containing two values. These
values affect the calculation of polychoric correlations when some
frequencies in the bivariate table are zero. The first value only
applies for 2x2 tables. The second value for larger tables. This value
is added to the zero frequency in the bivariate table. If
"default", the value is set depending on the
option. By default, lavaan uses
zero.add = c(0.5. 0.0).
Logical. This argument only affects
the computation of polychoric correlations for 2x2 tables with an empty
cell, and where a value is added to the empty cell. If
other values of the frequency table are adjusted so that all margins are
"default", the value is set depending on the
"mimic". The default is
Logical. Only used if some observed
endogenous variables are categorical. If
TRUE, give a warning if
one or more cells of a bivariate frequency table are empty.
Starting values options:
If it is a character string, the two options are
"Mplus". In the first case, all
parameter values are set to zero, except the factor loadings (set to
one), the variances of latent variables (set to 0.05), and the residual
variances of observed variables (set to half the observed variance).
"Mplus", we use a similar scheme, but the factor loadings are
estimated using the fabin3 estimator (tsls) per factor.
start is a fitted object of class
the estimated values of the corresponding parameters will be extracted.
If it is a parameter table, for example the output of the
paramaterEstimates() function, the values of the
ustart column (whichever is found first) will be
the starting values are checked for possibly
inconsistent values (for example values implying correlations larger
than one). If needed, a warning is given.
TRUE, and the model
converged, a warning
is given if the optimizer decided that a (local) solution has
been found, while not all elements of the (unscaled) gradient (as
seen by the optimizer) are (near) zero, as
they should be (the tolerance used is 0.001).
TRUE, and the model
converged, a check is performed after (post) fitting, to verify if
the solution is admissable. This implies that all variances are
non-negative, and all the model-implied covariance matrices are
positive (semi-)definite. For the latter test, we tolerate a tiny
negative eigenvalue that is smaller than .Machine$double.eps^(3/4),
treating it as being zero.
TRUE, and the model converged,
we check if the variance-covariance matrix of the free parameters
is positive definite. We take into account possible equality and
acitive inequality constraints. If needed, a warning is given.
TRUE, the function value is printed out
during each iteration.
TRUE, some (possibly harmless) warnings
are printed out during the iterations.
TRUE, debugging information is printed
Set the model type: possible values
"growth". This may affect
how starting values are computed, and may be used to alter the terminology
used in the summary output, or the layout of path diagrams that are
based on a fitted lavaan object.
"Mplus", an attempt is made to mimic the
Mplus program. If
"EQS", an attempt is made to mimic the EQS
"default", the value is (currently) set to to
"lavaan", which is very close to
"LISREL" the classical LISREL
matrix representation is used to represent the model (using the all-y
variant). No other options are available (for now).
TRUE, compute the model-implied
statistics, and store them in the implied slot.
TRUE, compute the unrestricted model
and store the unrestricted summary statistics (and perhaps a
loglikelihood) in the h1 slot.
Not used yet.
conditional.x = TRUE, the (default) baseline model will
allow the slopestructure to be unrestricted.
1 2 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.