顯變項的 Heywood 案例

在 R 中使用 lavaan 的結構方程模型

Erin Buchanan

Professor

為何會有負變異?

  • 負變異可能出現的原因:
    • 模型設置錯誤或識別不足
    • 樣本過小或抽樣波動
    • 顯變項量尺不一致
    • 資料偏態或非常態
在 R 中使用 lavaan 的結構方程模型

負變異範例

negative.model <- 'latent1 =~ V1 + V2 + V3
    latent2 =~ V4 + V5 + V6'
negative.fit <- cfa(negative.model, data = negative_data)
Warning message:
In lavaan::lavaan(model = negative.model, 
  data = negative_data,  :
  lavaan WARNING: model has NOT converged!
在 R 中使用 lavaan 的結構方程模型

用摘要檢視 Heywood 案例

summary(negative.fit, standardized = TRUE,
        fit.measures = TRUE, rsquare = TRUE)
** WARNING ** lavaan (0.5-23.1097) did 
   NOT converge after 10000 iterations
** WARNING ** Estimates below are most likely unreliable
Variances:
         Estimate  Std.Err z-value P(>|z|)  Std.lv  Std.all
   .V2    -3949.334      NA                -3949.334 -211.745
   .V5    11885.910      NA                11885.910 615.668
在 R 中使用 lavaan 的結構方程模型

檢視 R-Square 輸出

R-Square:
                   Estimate 
    V1                 0.001
    V2                    NA
    V3                 0.000
    V4                -0.000
    V5              -614.668
    V6                -0.000
var(negative_data$V2)
18.83833
在 R 中使用 lavaan 的結構方程模型

更新模型

negative.model <- 'latent1 =~ V1 + V2 + V3
    latent2 =~ V4 + V5 + V6
    V2 ~~ 18.83833*V2'

negative.fit <- cfa(negative.model,
                    data = negative_data)

summary(negative.fit,
        standardized = TRUE,
        fit.measures = TRUE,
        rsquare = TRUE)
在 R 中使用 lavaan 的結構方程模型

更新後的新輸出

Variances:
          Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .V2      18.838                              18.838    0.962
   .V1       7.655    1.145    6.687    0.000    7.655    0.772
   .V3      16.100    1.580   10.189    0.000   16.100    0.848
   .V4      13.866    1.017   13.638    0.000   13.866    0.876
   .V5       8.851    5.472    1.617    0.106    8.851    0.400
   .V6      12.336    0.599   20.596    0.000   12.336    0.956
    latent1  2.261    1.128    2.004    0.045    1.000    1.000
    latent2  1.956    0.875    2.236    0.025    1.000    1.000
在 R 中使用 lavaan 的結構方程模型

負變異範例(5)

R-Square:
                   Estimate
    V2                0.038
    V1                0.228
    V3                0.152
    V4                0.124
    V5                0.600
    V6                0.044
在 R 中使用 lavaan 的結構方程模型

一起來練習吧!

在 R 中使用 lavaan 的結構方程模型

Preparing Video For Download...