Description
Usage
Arguments
Value
References
Examples
View source: R/lav_residuals.R
‘lavResiduals’ provides model residuals and standardized residuals from
a fitted lavaan object, as well as various summaries of these residuals.
The ‘residuals()’ (and ‘resid()’) methods are just shortcuts to
this function with a limited set of arguments.
 (object, = "cor.bentler", se = , zstat = ,
= , h1.acov = "unstructured", add.type = ,
add.labels = , add.class = , drop.list.single.group = )

object 
An object of class lavaan .

type 
Character.
If type = "raw" , this function returns the raw (= unscaled)
difference between the observed and the expected (modelimplied) summary
statistics, as well as the standardized version of these residualds.
If type = "cor" , or type = "cor.bollen" , the observed and model
implied covariance matrices are first transformed to a correlation matrix
(using cov2cor() ), before the residuals are computed.
If type = "cor.bentler" , both the observed and model implied covariance
matrices are rescaled by dividing the elements by the square roots of the
corresponding variances of the observed covariance matrix.

se 
Logical. If TRUE , show the estimated standard errors
for the residuals.

zstat 
Logical. If TRUE , show the standardized residuals, which
are the raw residuals divided by the corresponding (estimated) standard
errors.

summary 
Logical. If TRUE , show various summaries of the
(possibly scaled) residuals. When type = "raw" , we compute the
RMR. When type = "cor.bentler" ,
we compute the SRMR. When type = "cor.bollen" , we compute the CRMR.
An unbiased version of these summaries is also computed, as well as a
standard error, a zstatistic and a pvalue for the test of exact fit
based on these summaries.

h1.acov 
Character. If "unstructured" , the observed summary
statistics are used as consistent estimates of the corresponding (unrestricted)
population statistics. If "structured" , the modelimplied summary
statistics are used as consistent estimates of the corresponding (unrestricted)
population statistics. This affects the way the asymptotic variance matrix
of the summary statistics is computed.

add.type 
Logical. If TRUE , show the type of residuals
in the output.

add.labels 
If TRUE , variable names are added to the vectors
and/or matrices.

add.class 
If TRUE , vectors are given the ‘lavaan.vector’
class; matrices are given the ‘lavaan.matrix’ class, and symmetric
matrices are given the ‘lavaan.matrix.symmetric’ class.
This only affects the way they are printed on the screen.

drop.list.single.group 
If FALSE , the results are returned as
a list, where each element corresponds to a group (even if there is only
a single group). If TRUE , the list will be unlisted if there is
only a single group.

If drop.list.single.group = TRUE
, a list of (residualized) summary
statistics, including type, standardized residuals, and summaries. If
drop.list.single.group = FALSE
, the list of summary statistics is nested
within a list for each group.
Bentler, P.M. and Dijkstra, T. (1985). Efficient estimation via linearization
in structural models. In Krishnaiah, P.R. (Ed.), Multivariate analysis  VI,
(pp. 942). New York, NY: Elsevier.
Ogasawara, H. (2001). Standard errors of fit indices using residuals in
structural equation modeling. Psychometrika, 66(3), 421436.
MaydeuOlivares, A. (2017). Assessing the size of model misfit in structural
equation models. Psychometrika, 82(3), 533558.
Standardized Residuals in Mplus. Document retrieved from URL
http://www.statmodel.com/download/StandardizedResiduals.pdf
 HS.model < ' visual =~ x1 + x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9 '
fit < (HS.model, = )
(fit)

yrosseel/lavaan documentation built on Dec. 14, 2018, 6:24 p.m.