Learn R Programming

semTools (version 0.5-3)

lavTestLRT.mi: 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 '>lavaan.mi. object should be nested within (more constrained than) h1.

test

character indicating which pooling method to use. "D3", "mr", or "meng.rubin" (default) requests the method described by Meng & Rubin (1992). "D2", "LMRR", or "Li.et.al" requests the complete-data LRT statistic should be calculated using each imputed data set, which will then be pooled across imputations, as described in Li, Meng, Raghunathan, & Rubin (1991). Find additional details in Enders (2010, chapter 8).

omit.imps

character vector specifying criteria for omitting imputations from pooled results. Can include any of c("no.conv", "no.se", "no.npd"), the first 2 of which are the default setting, which excludes any imputations that did not converge or for which standard errors could not be computed. The last option ("no.npd") would exclude any imputations which yielded a nonpositive definite covariance matrix for observed or latent variables, which would include any "improper solutions" such as Heywood cases. Specific imputation numbers can also be included in this argument, in case users want to apply their own custom omission criteria (or simulations can use different numbers of imputations without redundantly refitting the model).

asymptotic

logical. If FALSE (default), the pooled test will be returned as an F-distributed statistic with numerator (df1) and denominator (df2) degrees of freedom. If TRUE, the pooled F statistic will be multiplied by its df1 on the assumption that its df2 is sufficiently large enough that the statistic will be asymptotically \(\chi^2\) distributed with df1.

pool.robust

logical. Ignored unless test = "D2" and a robust test was requested. If pool.robust = TRUE, the robust test statistic is pooled, whereas pool.robust = FALSE will pool the naive test statistic (or difference statistic) and apply the average scale/shift parameter to it (unavailable for mean- and variance-adjusted difference statistics, so pool.robust will be set TRUE).

...

Additional arguments passed to lavTestLRT, only if test = "D2" and pool.robust = TRUE

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.

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.

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

lavTestLRT, compareFit

Examples

Run this code
# NOT RUN {
 
# }
# 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)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab