Hello,
I have a question regarding the difference between the SRMR value for a fitted model when the mean structure is included vs. not.
I noticed that the output for fitMeasures() and lavResiduals() differs slightly based on whether the mean structure has been included in the model or not.
See the following example:
HS.model <- ' visual =~ x1 + x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9 '
fit1 <- cfa(HS.model, data = HolzingerSwineford1939) # mean structure not included
fit2 <- cfa(HS.model, data = HolzingerSwineford1939, meanstructure = T) # mean structure included
# for fitted model wherein mean structure is not included (fit1)
fitMeasures(fit1)["srmr"]
lavResiduals(fit1)$summary["srmr",]
## above SRMR values match
# for fitted model wherein meanstructure is included (fit2)
fitMeasures(fit2)["srmr"]
lavResiduals(fit2)$summary["srmr",]
For fit2 (when mean structure is included), why is there an additional mean and total column in the lavResiduals() output? Additionally, why is the value for the cov column different from that of the total column (I find this confusing because the mean column is 0—though this may only be the rounded value—as I would assume that the total column is a sum of the cov and mean columns)?
Thanks for the help!
Aditi
Hi Vika,
Thank you for the clear explanation. I tried calculating SRMR both ways (including mean structure and not) using a function I wrote and was able to reproduce the lavaan output, so this makes sense to me now.
Aditi