lavaan
class represents a (fitted) latent variable
model. It contains a description of the model as specified by the user,
a summary of the data, an internal matrix representation, and if the model
was fitted, the fitting results.call
:match.call()
.timing
:Options
:ParTable
:pta
:Data
:"Data"
: information
about the data.SampleStats
:"SampleStats"
: sample
statisticsModel
:"Model"
: the
internal (matrix) representation of the modelCache
:Fit
:"Fit"
: the
results of fitting the modelboot
:optim
:implied
:vcov
:test
:external
:signature(object = "lavaan", type = "free")
: Returns
the estimates of the parameters in the model as a named numeric vector.
If type="free"
, only the free parameters are returned. If
type="unco"
, both free and constrained parameters (simple
equality constraints only) are returned.
If type="user"
, all parameters listed in the parameter table
are returned, including constrained and fixed parameters.signature(object = "lavaan")
: Returns the
implied moments of the model as a list with two elements (per group):
cov
for the implied covariance matrix,
and mean
for the implied mean
vector. If only the covariance matrix was analyzed, the implied mean
vector will be zero.signature(object = "lavaan")
: an alias for
fitted.values
.signature(object = "lavaan", type="raw")
:
If type="raw"
, this function returns the raw (=unstandardized)
difference between the implied moments and the observed moments as
a list of two elements: cov
for the residual covariance matrix,
and mean
for the residual mean vector.
If only the covariance matrix was analyzed, the residual mean vector
will be zero.
If type="cor"
, the observed and model implied covariance matrix
is first transformed to a correlation matrix (using cov2cor
),
before the residuals are computed.
If type="normalized"
, the residuals are
divided by the square root of an asymptotic variance estimate of the
corresponding sample statistic (the variance estimate depends on the
choice for the se
argument).
If type="standardized"
, the residuals are divided by the square
root of the difference between an asymptotic variance estimate of the
corresponding sample statistic and an asymptotic variance estimate of
the corresponding model-implied statistic.
In the latter case, the residuals have a metric similar
to z-values. On the other hand, they may often result in NA
values; for these cases, it may be better to use the normalized residuals. For
more information about the normalized and standardized residuals, see
the Mplus reference below.signature(object = "lavaan")
: an alias
for residuals
signature(object = "lavaan")
: returns the
covariance matrix of the estimated parameters.signature(object = "lavaan")
: compute
factor scores for all cases that are provided in the data frame. For
complete data only.signature(object = "lavaan")
: returns
model comparison statistics. See anova
. At least
two arguments (fitted models) are required. If the test statistic is
scaled, an appropriate scaled difference test will be computed.signature(object = "lavaan", model.syntax, ...,
evaluate=TRUE)
: update a fitted lavaan object and evaluate it
(unless evaluate=FALSE
). Note that we use the environment
that is stored within the lavaan object, which is not necessarily
the parent frame.signature(object = "lavaan")
: returns the effective
number of observations used when fitting the model. In a multiple group
analysis, this is the sum of all observations per group.signature(object = "lavaan")
:
returns the log-likelihood of the fitted model, if maximum likelihood estimation
was used. The AIC
and BIC
methods automatically work via logLik()
.signature(object = "lavaan", what = "free")
: This
method is now a shortcut for the lavInspect()
function. See
lavInspect for more details.signature(object = "lavaan")
: Print a short summary
of the model fitsignature(object = "lavaan", header = TRUE, fit.measures=FALSE, estimates = TRUE, ci = FALSE, fmi = FALSE, standardized = FALSE, rsquare=FALSE, std.nox = FALSE, modindices=FALSE, ci=FALSE, nd = 3L)
:
Print a nice summary of the model estimates.
If header = TRUE
, the header section (including fit measures) is
printed.
If fit.measures = TRUE
, additional fit measures are added to the
header section.
If estimates = TRUE
, print the parameter estimates section.
If ci = TRUE
, add confidence intervals to the parameter estimates
section.
If fmi = TRUE
, add the fmi (fraction of missing information)
column, if it is available.
If standardized=TRUE
,
the standardized solution is also printed.
If rsquare=TRUE
, the R-Square values for the dependent variables
in the model are printed.
If std.nox = TRUE
, the std.all
column contains the
the std.nox
column from the parameterEstimates() output.
If modindices=TRUE
, modification indices
are printed for all fixed parameters.
The argument nd
determines the number of digits after the
decimal point to be printed (currently only in the parameter estimates
section.
Nothing is returned (use
inspect
or another extractor function
to extract information from a fitted model).Standardized Residuals in Mplus. Document retrieved from URL http://www.statmodel.com/download/StandardizedResiduals.pdf
cfa
, sem
, growth
,
fitMeasures
, standardizedSolution
,
parameterEstimates
,
modindices
HS.model <- ' visual =~ x1 + x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9 '
fit <- cfa(HS.model, data=HolzingerSwineford1939)
summary(fit, standardized=TRUE, fit.measures=TRUE, rsquare=TRUE)
inspect(fit, "free")
inspect(fit, "start")
inspect(fit, "rsquare")
inspect(fit, "fit")
fitted.values(fit)
coef(fit)
resid(fit, type="normalized")
Run the code above in your browser using DataLab