lavTestLRT.mi {semTools} | R Documentation |
Likelihood Ratio Test for Multiple Imputations
Description
Likelihood ratio test (LRT) for lavaan models fitted to multiple imputed data sets. Statistics for comparing nested models can be calculated by pooling the likelihood ratios across imputed data sets, as described by Meng & Rubin (1992), or by pooling the LRT statistics from each imputation, as described by Li, Meng, Raghunathan, & Rubin (1991).
Usage
lavTestLRT.mi(object, h1 = NULL, test = c("D3", "D2"),
omit.imps = c("no.conv", "no.se"), asymptotic = FALSE,
pool.robust = FALSE, ...)
Arguments
object , h1 |
An object of class |
test |
|
omit.imps |
|
asymptotic |
|
pool.robust |
|
... |
Additional arguments passed to |
Details
The Meng & Rubin (1992) method, also referred to as the "D3"
statistic, is only applicable when using a likelihood-based estimator.
Otherwise (e.g., DWLS for categorical outcomes), users are notified that
test
was set to "D2"
.
test = "Mplus"
implies "D3"
and asymptotic = TRUE
(see Asparouhov & Muthen, 2010).
Note that unlike lavTestLRT
, lavTestLRT
can
only be used to compare a single pair of models, not a longer list of
models. To compare several nested models fitted to multiple imputations,
see examples on the compareFit
help page.
Value
A vector containing the LRT statistic (either an F
or \chi^2
statistic, depending on the asymptotic
argument), its degrees of
freedom (numerator and denominator, if asymptotic = FALSE
), its
p value, and 2 missing-data diagnostics: the relative invrease
in variance (RIV, or average for multiparameter tests: ARIV) and the
fraction missing information (FMI = ARIV / (1 + ARIV)). Robust statistics
will also include the average (across imputations) scaling factor and
(if relevant) shift parameter(s), unless pool.robust = TRUE
.
Author(s)
Terrence D. Jorgensen (University of Amsterdam; TJorgensen314@gmail.com)
References
Enders, C. K. (2010). Applied missing data analysis. New York, NY: Guilford.
Li, K.-H., Meng, X.-L., Raghunathan, T. E., & Rubin, D. B. (1991). Significance levels from repeated p-values with multiply-imputed data. Statistica Sinica, 1(1), 65–92. Retrieved from https://www.jstor.org/stable/24303994
Meng, X.-L., & Rubin, D. B. (1992). Performing likelihood ratio tests with multiply-imputed data sets. Biometrika, 79(1), 103–111. doi:10.2307/2337151
Rubin, D. B. (1987). Multiple imputation for nonresponse in surveys. New York, NY: Wiley.
See Also
Examples
## Not run:
## impose missing data for example
HSMiss <- HolzingerSwineford1939[ , c(paste("x", 1:9, sep = ""),
"ageyr","agemo","school")]
set.seed(12345)
HSMiss$x5 <- ifelse(HSMiss$x5 <= quantile(HSMiss$x5, .3), NA, HSMiss$x5)
age <- HSMiss$ageyr + HSMiss$agemo/12
HSMiss$x9 <- ifelse(age <= quantile(age, .3), NA, HSMiss$x9)
## impute missing data
library(Amelia)
set.seed(12345)
HS.amelia <- amelia(HSMiss, m = 20, noms = "school", p2s = FALSE)
imps <- HS.amelia$imputations
## specify CFA model from lavaan's ?cfa help page
HS.model <- '
visual =~ x1 + b1*x2 + x3
textual =~ x4 + b2*x5 + x6
speed =~ x7 + b3*x8 + x9
'
fit1 <- cfa.mi(HS.model, data = imps, estimator = "mlm")
fit0 <- cfa.mi(HS.model, data = imps, estimator = "mlm", orthogonal = TRUE)
## By default, use D3.
## Must request a chi-squared statistic to be robustified.
lavTestLRT.mi(fit1, h1 = fit0, asymptotic = TRUE)
## Using D2, you can either robustify the pooled naive statistic ...
lavTestLRT.mi(fit1, h1 = fit0, asymptotic = TRUE, test = "D2")
## ... or pool the robust chi-squared statistic
lavTestLRT.mi(fit1, h1 = fit0, asymptotic = TRUE, test = "D2",
pool.robust = TRUE)
## End(Not run)