Hello everybody,
I am fitting a sequence of multilevel CFA models using lavaan. Following chapter 14 of the book Multilevel analysis by Hox, Moerbeek and van de Schoot, I first fit three benchmark models. When I fit the null model (all item variances at level-2 fixed to zero) then lavaan produces the same parameter estimates and standard error as Mplus, but all fit indices are NA. The weird thing is fit indices are displayed when I fit the independence model (with non-zero item variances at level-2 but zero item-covariances at level-2) and the saturated model (with non-zero variances and covariances at level-2).
The data I am using are from chapter 7 of the book by Heck, Thomas and Tabata and can be downloaded from the support material at this website: https://www.routledge.com/Multilevel-and-Longitudinal-Modeling-with-IBM-SPSS/Heck-Thomas-Tabata/p/book/9780367424619
My lavaan syntax is as follows
library(haven)
library(lavaan)
WorkLife <- read_sav("ch7ex2constructs.sav")
model1a <- '
level: 1
worklife =~ 1*W1varied + W2value + W3team
productivity =~ 1*P1assess + P2progress + P3evstand
worklife ~~ NA*worklife
productivity ~~ NA*productivity
level: 2
W1varied ~~ 0*W1varied
W2value ~~ 0*W2value
W3team ~~ 0*W3team
P1assess ~~ 0*P1assess
P2progress ~~ 0*P2progress
P3evstand ~~ 0*P3evstand
'
fit1a <- sem(model = model1a,
data = WorkLife,
cluster = "group",
std.lv = TRUE,
verbose = FALSE)
fitMeasures(fit1a)
summary(fit1a, fit.measures = FALSE)
How do I get the fit indices to be displayed in the output? Any help would be greatly appreciated!
Thanks in advance,
Mirjam Moerbeek
--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/lavaan/CAFPdW3VEK%2BMPQnT4ctp3cFM7Jxq98bU43FffrUMoS2KPSrtQOQ%40mail.gmail.com.