lavTestLRT.mi | R Documentation |
Likelihood ratio test (LRT) for lavaan models fitted to multiple imputed data sets.
lavTestLRT.mi(
object,
...,
modnames = NULL,
asANOVA = TRUE,
pool.method = c("D4", "D3", "D2"),
omit.imps = c("no.conv", "no.se"),
asymptotic = FALSE,
pool.robust = FALSE
)
## S4 method for signature 'lavaan.mi'
anova(object, ...)
object |
An object of class lavaan.mi |
... |
Additional objects of class lavaan.mi, as
well as arguments passed to |
modnames |
Optional |
asANOVA |
|
pool.method |
Find additional details in Enders (2010, chapter 8). |
omit.imps |
|
asymptotic |
|
pool.robust |
|
The "D2"
method is available using any estimator and test statistic.
When using a likelihood-based estimator, 2 additional methods are available
to pool the LRT.
The Meng & Rubin (1992) method, commonly referred to as "D3"
.
This method has many problems, discussed in Chan & Meng (2022).
The Chan & Meng (2022) method, referred to as "D4"
by
Grund et al. (2023), resolves problems with "D3"
.
When "D2"
is not explicitly requested in situations it is the only
applicable method, (e.g., DWLS for categorical outcomes), users are notified
that pool.method
was set to "D2"
.
pool.method = "Mplus"
implies "D3"
and asymptotic = TRUE
(see Asparouhov & Muthen, 2010).
Note that the anova()
method simply calls lavTestLRT.mi()
.
When asANOVA=TRUE
, returns an object of class stats::anova with a
a test of model fit for a single model (object
) or test(s) of the
difference(s) in fit between nested models passed via ...
(either an
F
or \chi^2
statistic, depending on the asymptotic
argument),
its degrees of freedom, its p value, and 2 missing-data diagnostics:
the relative increase in variance (RIV = FMI / (1 -
FMI)) and the
fraction of missing information (FMI = RIV / (1 + RIV)).
When asANOVA=FALSE
, returns a vector containing the LRT statistic for
a single model or comparison of a single pair of models, or a
data.frame
of multiple model comparisons. Robust statistics will also
include the average (across imputations) scaling factor and
(if relevant) shift parameter(s), unless pool.robust = TRUE
.
When using pool.method = "D3"
or "D4"
, the vector for a single
model also includes its average log-likelihood and information criteria.
Terrence D. Jorgensen (University of Amsterdam; TJorgensen314@gmail.com)
Based on source code for lavaan::lavTestLRT()
by Yves Rosseel.
Asparouhov, T., & Muthen, B. (2010). Chi-square statistics with multiple imputation. Technical Report. Retrieved from http://www.statmodel.com/
Chan, K. W., & Meng, X. L. (2022). Multiple improvements of multiple imputation likelihood ratio tests. Statistica Sinica, 32, 1489–1514. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.5705/ss.202019.0314")}
Enders, C. K. (2010). Applied missing data analysis. New York, NY: Guilford.
Grund, S., Lüdtke, O., & Robitzsch, A. (2023). Pooling methods for likelihood ratio tests in multiply imputed data sets. Psychological Methods, 28(5), 1207–1221. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1037/met0000556")}
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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.2307/2337151")}
Rubin, D. B. (1987). Multiple imputation for nonresponse in surveys. New York, NY: Wiley. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/9780470316696")}
lavaan::lavTestLRT()
for arguments that can be passed via ...,
and use lavaan::fitMeasures()
to obtain fit indices calculated from pooled
test statistics.
data(HS20imps) # import a list of 20 imputed data sets
## specify CFA model from ?lavaan::cfa help page
HS.model <- '
visual =~ x1 + x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9
'
fit1 <- cfa.mi(HS.model, data = HS20imps, estimator = "mlm")
## By default, pool.method = "D4".
## Must request an asymptotic chi-squared statistic
## in order to accommodate a robust correction.
lavTestLRT.mi(fit1, asymptotic = TRUE)
## or anova(fit1, asymptotic = TRUE)
## Comparison with more constrained (nested) models: parallel indicators
HS.parallel <- '
visual =~ x1 + 1*x2 + 1*x3
textual =~ x4 + 1*x5 + 1*x6
speed =~ x7 + 1*x8 + 1*x9
'
fitp <- cfa.mi(HS.parallel, data = HS20imps, estimator = "mlm")
## Even more constrained model: orthogonal factors
fit0 <- cfa.mi(HS.parallel, data = HS20imps, estimator = "mlm",
orthogonal = TRUE)
## Compare 3 models, and pass the lavTestLRT(method=) argument
lavTestLRT.mi(fit1, fit0, fitp, asymptotic = TRUE,
method = "satorra.bentler.2010")
## For a single model, you can request a vector instead of an anova-class
## table in order to see naive information criteria (only using D3 or D4),
## which are calculated using the average log-likelihood across imputations.
lavTestLRT.mi(fit1, asANOVA = FALSE)
## When using a least-squares (rather than maximum-likelihood) estimator,
## only the D2 method is available. For example, ordered-categorical data:
data(binHS5imps) # import a list of 5 imputed data sets
## fit model using default DWLS estimation
fit1c <- cfa.mi(HS.model , data = binHS5imps, ordered = TRUE)
fit0c <- cfa.mi(HS.parallel, data = binHS5imps, ordered = TRUE,
orthogonal = TRUE)
## Using D2, you can either robustify the pooled naive statistic ...
lavTestLRT.mi(fit1c, fit0c, asymptotic = TRUE, pool.method = "D2")
## ... or pool the robust chi-squared statistic (NOT recommended)
lavTestLRT.mi(fit1c, fit0c, asymptotic = TRUE, pool.method = "D2",
pool.robust = TRUE)
## When calculating fit indices, you can pass lavTestLRT.mi() arguments:
fitMeasures(fit1c, output = "text",
# lavTestLRT.mi() arguments:
pool.method = "D2", pool.robust = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.