I want to extract the error variance for each item (i.e. indicator) from a lavaan CFA.
library(lavaan)
HS.model <- ' visual =~ x1 + x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9 '
fit <- cfa(HS.model, data = HolzingerSwineford1939)
summary(fit, fit.measures = TRUE)
I know I can extract the lambdas with inspect(fit, what = "est")$lambda
. How can I get the error variances for each item?
lavInspect(fit, what = "est")$theta
This is the entire covariance matrix of residuals. The diagonal has residual variances.