View source: R/lav_residuals.R
| lavResiduals | R Documentation |
‘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.
lavResiduals(object, type = "cor_bentler", h1 = NULL,
se = FALSE, zstat = TRUE, summary = TRUE, elementwise = TRUE,
combine = FALSE, usrmr_ci_level = 0.90, usrmr_close_h0 = 0.05,
h1_acov = "unstructured",
add_type = TRUE, add_labels = TRUE, add_class = TRUE,
drop_list_single_group = TRUE,
maximum_number = 0L, n_largest = 5L, output = "list", ...)
object |
An object of class |
type |
Character. Dots and underscores are interchangeable
( |
h1 |
Optional. A user-provided saturated (unrestricted) model supplying
the observed summary statistics against which the model-implied statistics are
compared. It can be a fitted |
se |
Logical. If |
zstat |
Logical. If |
summary |
Logical. If The two versions are reported with different inferential statistics, and this asymmetry is intentional. The sample RMR/SRMR/CRMR overestimate (are positively biased for) their population values. For these (biased) statistics, we report a standard error and a test of exact fit (the null hypothesis that the population value equals zero). This test relies on the known sampling distribution of the (biased) sample statistic under exact fit (Maydeu-Olivares, 2017, Eqs. 28–30), where the bias is explicitly accounted for. For the (approximately) unbiased URMR/USRMR/UCRMR, we report a standard error, a confidence interval, and a test of close fit (the null hypothesis that the population value equals a small nonzero cutoff, e.g. 0.05). The confidence interval and the close-fit test require an (approximately) unbiased and normally distributed estimator, which is precisely why the unbiased version is used here. Conversely, no test of exact fit is reported for the unbiased estimator: because it is truncated at zero, its sampling distribution is degenerate at the exact-fit boundary, so the test of exact fit is (correctly) only based on the biased statistic. |
elementwise |
Logical. If |
combine |
Logical. Only relevant when multiple blocks are
involved (multiple groups, or multiple levels). If |
usrmr_ci_level |
Numeric. The confidence level of the confidence interval that is reported (in the summary) for the unbiased URMR/USRMR/UCRMR. The default is 0.90. |
usrmr_close_h0 |
Numeric. The value of the population URMR/USRMR/UCRMR under the null hypothesis of the test of close fit that is reported (in the summary) for the unbiased estimator. The default is 0.05. |
h1_acov |
Character. If |
add_type |
Logical. If |
add_labels |
If |
add_class |
If |
drop_list_single_group |
If |
maximum_number |
Integer. Only used if |
n_largest |
Integer. Only used if |
output |
Character. By default, |
... |
To support old argument names. |
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. 9–42). New York, NY: Elsevier.
Ogasawara, H. (2001). Standard errors of fit indices using residuals in structural equation modeling. Psychometrika, 66(3), 421–436. doi:10.1007/BF02294443
Maydeu-Olivares, A. (2017). Assessing the size of model misfit in structural equation models. Psychometrika, 82(3), 533–558. doi:10.1007/s11336-016-9552-7
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 <- cfa(HS.model, data = HolzingerSwineford1939)
lavResiduals(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.