I've recently been using Lavaan and semTools to test for measurement invariance in confirmatory factor analysis (CFA) models and I noticed an (apparent) inconsistency in a calculation that confused me. When you use the "measurementInvariance" command from semTools to test nested models (using MLR), the chi-square difference value (delta.chisq.scaled) is not the same as when you manually extract the fit statistic from each model and subtract them yourself. It also does not match the difference in the non-scaled chi-square values. Am I missing something about how this is calculated?
I've given an example below using demo data from Lavaan. Thanks in-advance!
require(lavaan) require(semTools) HW.model <- 'visual =~ x1 + x2 + x3 textual =~ x4 + x5 + x6 speed =~ x7 + x8 + x9 ' out<-measurementInvariance(HW.model, data=HolzingerSwineford1939, estimator = "MLR",group="school") modelDiff<-compareFit(out) summary(modelDiff, fit.measures="all")
The resulting values are:
- measurementinvariance command chi-square (scaled) diff = 6.567
- manual subtraction of extracted chi-square (scaled) values = 4.25
- manual subtraction of extracted non-scaled chi-square values = 7.68
Does anyone know why the values from list item 1 & 2 above differ?