我正在尝试在三因素精神病模型上运行男女MGCFA。当我在整个小组中运行模型时(在分隔性别之前),模型运行良好:
THREEmodelmod.fit = cfa(THREEmodelmod,
data=CAPPDATA2,
estimator="WLSMV",
meanstructure = TRUE)
summary(THREEmodelmod.fit,
standardized=TRUE,
rsquare=TRUE,
fit.measure = TRUE)
我收到的输出似乎很好:没有警告消息,没有Heywood案例,没有合理的拟合指数,而且有正方差-尽管我的一个因素的方差非常低0.009 ..
当我尝试使用measurementInvariance函数运行MG-Invariance时(如下所示)
options(scipen = 999)
multisteps = measurementInvariance(THREEmodelmod,
data = CAPPDATA2,
group = "Gender",
strict = TRUE)
I receive the following error messages:
Warning messages:
1: In lav_object_post_check(object) :
lavaan WARNING: some estimated lv variances are negative
2: In lav_object_post_check(object) :
lavaan WARNING: some estimated lv variances are negative
该功能仍在运行并提供输出(如下),但我不知道警告消息来自何处以及原因。
Fit measures:
cfi rmsea cfi.delta rmsea.delta
fit.configural 0.889 0.069 NA NA
fit.loadings 0.888 0.068 0.001 0.001
fit.intercepts 0.884 0.068 0.004 0.000
fit.residuals 0.879 0.068 0.005 0.000
fit.means 0.877 0.069 0.002 0.000
然后,当我尝试通过在拦截步骤释放参数来调查局部不变性时(标量不变性)。我收到以下警告:
partial = partialInvariance(multisteps,
type = "scalar")
Error in obsdiff[varfree, , drop = FALSE] : subscript out of bounds
有人可以帮助我了解发生了什么吗?我对R和因子分析非常陌生。谢谢!