R - lavaan - sem - 负方差误差

时间:2017-05-25 14:53:06

标签: r variance r-lavaan sem invariance

我已经设置了这样的模型:

model3<-'
# MEASUREMENT
union =~ V24 + V25
loyality =~ V52 + V53 + V54
experience =~ V37 + V38 + V39 + V40
# STRUCTURAL
union ~ loyality
union ~ experience
# CORRELATED RESIDUALS
V37 ~~ V39
V37 ~~ V38
'

从摘要中我获得:

> summary(fit3 , standardized=T, fit.measures=T, rsquare=T)
lavaan (0.5-23.1097) converged normally after  77 iterations

  Number of observations                         21972

  Estimator                                       DWLS      Robust
  Minimum Function Test Statistic              330.153     394.021
  Degrees of freedom                                22          22
  P-value (Chi-square)                           0.000       0.000
  Scaling correction factor                                  0.847
  Shift parameter                                            4.299
    for simple second-order correction (Mplus variant)

Model test baseline model:

  Minimum Function Test Statistic            30573.174   22082.251
  Degrees of freedom                                36          36
  P-value                                        0.000       0.000

User model versus baseline model:

  Comparative Fit Index (CFI)                    0.990       0.983
  Tucker-Lewis Index (TLI)                       0.983       0.972

  Robust Comparative Fit Index (CFI)                            NA
  Robust Tucker-Lewis Index (TLI)                               NA

Root Mean Square Error of Approximation:

  RMSEA                                          0.025       0.028
  90 Percent Confidence Interval          0.023  0.028       0.025  0.030
  P-value RMSEA <= 0.05                          1.000       1.000

  Robust RMSEA                                                  NA
  90 Percent Confidence Interval                                NA     NA

Standardized Root Mean Square Residual:

  SRMR                                           0.018       0.018

Parameter Estimates:

  Information                                 Expected
  Standard Errors                           Robust.sem

Latent Variables:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
  union =~                                                              
    V24               1.000                               1.061    0.928
    V25               0.777    0.058   13.387    0.000    0.824    0.752
  loyality =~                                                           
    V52               1.000                               0.690    0.650
    V53               1.167    0.023   51.579    0.000    0.806    0.845
    V54               0.936    0.017   55.844    0.000    0.646    0.520
  experience =~                                                         
    V37               1.000                               0.349    0.363
    V38               2.570    0.071   36.179    0.000    0.897    0.695
    V39               0.915    0.033   28.040    0.000    0.319    0.302
    V40               2.359    0.100   23.481    0.000    0.824    0.680

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
  union ~                                                               
    loyality          0.039    0.015    2.656    0.008    0.025    0.025
    experience        0.346    0.031   11.169    0.000    0.114    0.114

Covariances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
 .V37 ~~                                                                
   .V39               0.336    0.008   44.158    0.000    0.336    0.372
   .V38               0.146    0.012   11.717    0.000    0.146    0.176
  loyality ~~                                                           
    experience       -0.034    0.003  -11.799    0.000   -0.142   -0.142

Intercepts:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .V24               2.521    0.008  326.748    0.000    2.521    2.204
   .V25               2.411    0.007  326.002    0.000    2.411    2.199
   .V52               2.413    0.007  336.811    0.000    2.413    2.272
   .V53               2.262    0.006  351.664    0.000    2.262    2.372
   .V54               3.211    0.008  382.509    0.000    3.211    2.581
   .V37               2.680    0.006  413.404    0.000    2.680    2.789
   .V38               3.494    0.009  401.170    0.000    3.494    2.706
   .V39               2.857    0.007  400.392    0.000    2.857    2.701
   .V40               3.926    0.008  480.422    0.000    3.926    3.241
   .union             0.000                               0.000    0.000
    loyality          0.000                               0.000    0.000
    experience        0.000                               0.000    0.000

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .V24               0.181    0.084    2.152    0.031    0.181    0.139
   .V25               0.522    0.051   10.244    0.000    0.522    0.435
   .V52               0.651    0.012   53.863    0.000    0.651    0.578
   .V53               0.260    0.012   21.187    0.000    0.260    0.286
   .V54               1.130    0.013   88.016    0.000    1.130    0.730
   .V37               0.801    0.010   81.075    0.000    0.801    0.868
   .V38               0.861    0.030   28.782    0.000    0.861    0.517
   .V39               1.017    0.010  104.495    0.000    1.017    0.909
   .V40               0.789    0.026   29.953    0.000    0.789    0.538
   .union             1.112    0.084   13.155    0.000    0.987    0.987
    loyality          0.476    0.013   37.173    0.000    1.000    1.000
    experience        0.122    0.008   16.093    0.000    1.000    1.000

R-Square:
                   Estimate
    V24               0.861
    V25               0.565
    V52               0.422
    V53               0.714
    V54               0.270
    V37               0.132
    V38               0.483
    V39               0.091
    V40               0.462
    union             0.013

“有趣”的是,我在尝试检查时收到负差异错误:

> measurementInvariance(model3,data=sub1,
+                       group="SEX")

Measurement invariance models:

Model 1 : fit.configural
Model 2 : fit.loadings
Model 3 : fit.intercepts
Model 4 : fit.means

Chi Square Difference Test

               Df    AIC    BIC   Chisq Chisq diff Df diff Pr(>Chisq)    
fit.configural 44 556605 557116  451.90                                  
fit.loadings   50 556754 557218  613.68     161.78       6  < 2.2e-16 ***
fit.intercepts 56 557229 557645 1100.58     486.90       6  < 2.2e-16 ***
fit.means      59 558714 559106 2591.56    1490.98       3  < 2.2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1


Fit measures:

                 cfi rmsea cfi.delta rmsea.delta
fit.configural 0.990 0.029        NA          NA
fit.loadings   0.987 0.032     0.004       0.003
fit.intercepts 0.976 0.041     0.011       0.009
fit.means      0.941 0.063     0.035       0.021

Warning messages:
1: In lav_object_post_check(object) :
  lavaan WARNING: some estimated ov variances are negative
2: In lav_object_post_check(object) :
  lavaan WARNING: some estimated ov variances are negative
3: In lav_object_post_check(object) :
  lavaan WARNING: some estimated ov variances are negative

我已经坚持了一段时间了。我已经读过在输出中的variances下,必须存在负方差(显然即使是单个方差也可能导致残差协方差矩阵为正定义。我的问题是:

  • 负差异在哪里?!或至少导致错误的原因以及我如何删除它?

其次,我确实在错误消息之前从measurementInvariance获得了一些输出。

  • 是否可以对所有Chi Square差异测试具有相同的意义?或者这仅仅是因为它是一个非常小的数字?

我真的会赞美任何帮助。我是lavaan的新手并且尽力理解,但在这里我需要一点点推动。

谢谢!

0 个答案:

没有答案