潛在變項的 Heywood 個案

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

Erin Buchanan

Professor

Heywood 個案

  • 超出界限的相關
  • 負變異數

含 Heywood 個案的範例模型圖

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

潛在變項範例

epi.model <- 'extraversion =~ V3 + V7 + V11 + V15
    neuroticism =~ V1 + V5 + V9 + V13
    lying =~ V4 + V8 + V12 + V16'
epi.fit <- cfa(model = epi.model, data = epi)
Warning message:
In lav_object_post_check(object) :
  lavaan WARNING: covariance matrix of latent variables
                is not positive definite;
                use inspect(fit,"cov.lv") to investigate.
在 R 中使用 lavaan 的結構方程模型

如何找出錯誤

summary(epi.fit, standardized = TRUE, 
        fit.measures = TRUE)
Covariances:
                Estimate Std.Err z-value P(>|z|)  Std.lv Std.all
  extraversion ~~                                                       
    neuroticism  -0.011   0.002  -6.822   0.000  -0.894  -0.894
    lying        -0.012   0.002  -6.801   0.000  -0.777  -0.777
  neuroticism ~~                                                        
    lying         0.012   0.002   7.023   0.000   0.982   0.982
在 R 中使用 lavaan 的結構方程模型

如何修正錯誤

#original model
epi.model <- 'extraversion =~ V3 + V7 + V11 + V15
    neuroticism =~ V1 + V5 + V9 + V13
    lying =~ V4 + V8 + V12 + V16'
#respecify the model
epi.model2 <- 'extraversion =~ V3 + V7 + V11 + V15
    neuroticism_lie =~ V1 + V5 + V9 + V13 + V4 + V8 + V12 + V16'

epi.fit2 <- cfa(model = epi.model2, data = epi)
summary(epi.fit2, standardized = T, fit.measures = T)
在 R 中使用 lavaan 的結構方程模型

如何修正錯誤(2)

Covariances:
                 Estimate Std.Err z-value P(>|z|)  Std.lv Std.all
  extraversion ~~                                                       
    neuroticism_li -0.011   0.002  -6.939   0.000  -0.843  -0.843
在 R 中使用 lavaan 的結構方程模型

一起來練習吧!

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

Preparing Video For Download...