- object
Either a data.frame
, or an object of class
lavaan
. If the input is a data.frame
, and
some variables are declared as ordered factors, lavaan will
treat them as ordinal variables.
- ordered
Character vector. Only used if object
is a
data.frame
. Treat these variables as ordered (ordinal) variables.
Importantly, all other variables will be treated as numeric (unless they
are declared as ordered in the original data frame.)
- group
Only used if object
is a data.frame
. Specify
a grouping variable.
- missing
If "listwise"
, cases with missing values are removed
listwise from the data frame. If "direct"
or
"ml"
or "fiml"
and the estimator is maximum likelihood,
an EM algorithm is used to estimate the unrestricted covariance matrix
(and mean vector). If "pairwise"
, pairwise deletion is used. If
"default"
, the value is set depending on the estimator and the
mimic option.
- sampling.weights
Only used if object
is a data.frame
.
Specify a variable containing sampling weights.
- ov.names.x
Only used if object
is a data.frame
. Specify
variables that need to be treated as exogenous. Only used if at least
one variable is declared as ordered.
- se
Only used if output
(see below) contains standard errors.
See lavOptions
for possible options.
- test
Only used if output is "fit"
or "lavaan"
. See
lavOptions
for possible options.
- estimator
If "none"
or "two.step"
or "two.stage"
,
only starting values are computed for the correlations (and thresholds),
without any further estimation. If all variables are continuous, the
starting values are the sample covariances (converted to correlations
if output = "cor"
). If at least one variable is ordered,
the thresholds are computed using univariate information only. The
polychoric and/or polyserial correlations are computed in a second
stage, keeping the values of the thresholds constant. If an estimator
(other than "two.step"
or "two.stage"
) is specified
(for example estimator = "PML"
), these starting values are
further updated by fitting the unrestricted model using the chosen
estimator. See the lavaan
function for alternative
estimators.
- baseline
Only used if output is "fit"
or "lavaan"
. If
TRUE
, a baseline model is also estimated. Note that the test
argument should also be set to a value other than "none"
.
- ...
Optional parameters that are passed to the lavaan
function.
- cor.smooth
Logical. Only used if output = "cor"
.
If TRUE
, ensure the resulting correlation matrix is positive
definite. The following simple method is used: an eigenvalue decomposition
is computed; then, eigenvalues smaller than cor.smooth.tol
are set to be equal to cor.smooth.tol
, before the matrix
is again reconstructed. Finally, the matrix (which may no longer have unit
diagonal elements) is converted to a correlation matrix using
cov2cor
.
- cor.smooth.tol
Numeric. Smallest eigenvalue used when reconstructing
the correlation matrix after an eigenvalue decomposition.
- output
If "cor"
, the function returns the correlation matrix only. If "cov"
, the function returns the covariance matrix (this only makes
a difference if at least one variable is numeric). If "th"
or
"thresholds"
, only the thresholds are returned. If "sampstat"
,
the output equals the result of lavInspect(fit, "sampstat")
where
fit is the unrestricted model. If "est"
or "pe"
or
"parameterEstimates"
, the output equals the result of
parameterEstimates(fit)
. Finally, if output is "fit"
or
"lavaan"
, the function returns an object of class
lavaan
.