我是 SEM + 在这个论坛上发帖的新手;如果我有任何不清楚的地方,请告诉我,我会尽力澄清。
背景
我正在做一项 SEM 任务来估计模型的拟合度,将 6 个指标加载到一个潜在变量上。我正在使用以下软件包进行分配:
require(lavaan)
require(semPlot)
我的数据集被加载到一个名为my.df
我指定的模型如下 - 该模型自动将第一个因子加载固定GeneralMotivation
为x1
1.0 的值:
my.model1 <- 'GeneralMotivation =~ x1 + x2 + x3 + x4 + x5 + x6'
我知道没有必要这样做,但为了更好地理解 SEM 的工作原理,我还指定了以下模型,释放了第一个指标。
problematicmy.model1 <- 'GeneralMotivation =~ NA*x1 + x2 + x3 + x4 + x5 + x6'
问题
然后我sem
在这两个模型上运行,如下图:
my.fit1 <- sem(my.model1, data=my.df)
problematicmy.fit1 <- sem(problematicmy.model1, data=my.df)
lavaan
当我使用in上的默认参数指定模型时,模型my.model1
的第一个指标固定为 1.0,没有任何问题。问题出现了problematicmy.model1
,我看到以下错误:
Warning message:
In lav_model_vcov(lavmodel = lavmodel, lavsamplestats = lavsamplestats, :
lavaan WARNING: could not compute standard errors!
lavaan NOTE: this may be a symptom that the model is not identified.
我还附上了违规模型的输出:
lavaan (0.5-17) converged normally after 14 iterations
Number of observations 400
Estimator ML
Minimum Function Test Statistic 112.214
Degrees of freedom 8
P-value (Chi-square) 0.000
Model test baseline model:
Minimum Function Test Statistic 360.443
Degrees of freedom 15
P-value 0.000
User model versus baseline model:
Comparative Fit Index (CFI) 0.698
Tucker-Lewis Index (TLI) 0.434
Loglikelihood and Information Criteria:
Loglikelihood user model (H0) -3181.787
Loglikelihood unrestricted model (H1) -3125.680
Number of free parameters 13
Akaike (AIC) 6389.574
Bayesian (BIC) 6441.463
Sample-size adjusted Bayesian (BIC) 6400.213
Root Mean Square Error of Approximation:
RMSEA 0.180
90 Percent Confidence Interval 0.152 0.211
P-value RMSEA <= 0.05 0.000
Standardized Root Mean Square Residual:
SRMR 0.111
Parameter estimates:
Information Expected
Standard Errors Standard
Estimate Std.err Z-value P(>|z|) Std.lv Std.all
Latent variables:
GeneralMotivation =~
x1 0.826 0.765 0.672
x2 0.571 0.528 0.534
x3 0.829 0.767 0.694
x4 0.191 0.176 0.215
x5 0.301 0.278 0.308
x6 0.295 0.273 0.322
Variances:
x1 0.709 0.709 0.548
x2 0.701 0.701 0.715
x3 0.632 0.632 0.518
x4 0.640 0.640 0.954
x5 0.740 0.740 0.905
x6 0.643 0.643 0.896
GeneralMotvtn 0.856 1.000 1.000
我还附上了下面的图形模型problematic.myfit1
:
为理解错误而采取的步骤
我首先想到“好吧,也许模型识别不足”,然后计算了我拥有的信息+要估计的参数数量。
如果我错了,请纠正我:应该有 21 条信息(6 个变量,因此 [(6)(7)]/2 = 21)。
但是,由于 p <.05 对所有事物统计的热爱,我无法理解如果我只是释放第一个指标,为什么模型识别不足x1
。据我了解,我只估计了总共 13 个参数(观察变量的 6 个残差x1
,x6
6 个因子载荷,以及潜在变量的方差GeneralMotivation
)。在这种情况下,我的模型不应该被过度识别吗?
我的猜测是
- 尽管图形模型没有说明这一点,但我实际上是在估计指标残差(即 等)之间的协
x1 ~~ x2
方差x1 ~~ x6
。如果x1
固定为 1.0,我实际上是在尝试估计 21 个参数(从 到 的 5 个残差,从x2
到x6
的 10 个残差协方差,从x2
到x6
的 5 个残差方差,从x2
到-x6
的 5 个因子载荷GeneralMotivation
,以及 的一个方差),使模型只是确定(df = 0)。通过释放,我必须估计另外 7 个参数(x2
x6
GeneralMotivation
x1
x1
x1 ~~ x2
x1 ~~ x6
GeneralMotivation
x1
- 问题不在于识别不足,而在于完全不同
- SEM 和 RStudio 讨厌我 - 不太可能,但我不排除它。
结束
谁能帮我理解为什么lavaan
会弹出错误?如果您需要我提供更多信息,请告诉我。
谢谢!