模型分析

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

Erin Buchanan

Professor

模型術語

  • 自由度(df)

    • 由觀察變數數量與估計值決定
    • df = 可行值 − 估計值
    • 可行值 = 觀察變數 * (觀察變數 + 1) / 2
  • 識別性

    • 至少包含三個觀察變數
    • 建立 df > 0 的模型
    • 用尺度設定與限制控制 df
在 R 中使用 lavaan 的結構方程模型

分析模型

#model specification
visual.model <- 'visual =~ x1 + x2 + x3 + x7 + x8 + x9'
#model analysis
visual.fit <- cfa(model = visual.model,
                  data = HolzingerSwineford1939)

視覺速度模型

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

整體摘要結果

summary(visual.fit)
lavaan (0.5-23.1097) 在 27 次迭代後正常收斂

  觀測數                                   301

  估計量                                    ML
  最小函式檢定統計量                     106.553
  自由度                                      9
  P 值(卡方)                              0.000

參數估計:
在 R 中使用 lavaan 的結構方程模型

摘要結果:載荷

潛在變數:
                   Estimate  Std.Err  z-value  P(>|z|)
  visual =~                                           
    x1                1.000                           
    x2                0.586    0.139    4.215    0.000
    x3                0.882    0.149    5.923    0.000
    x7                0.728    0.137    5.320    0.000
    x8                0.944    0.143    6.599    0.000
    x9                1.205    0.170    7.095    0.000
在 R 中使用 lavaan 的結構方程模型

摘要結果:變異數

變異數:
                   Estimate  Std.Err  z-value  P(>|z|)
   .x1                0.973    0.093   10.405    0.000
   .x2                1.249    0.106   11.789    0.000
   .x3                0.975    0.090   10.842    0.000
   .x7                0.979    0.087   11.311    0.000
   .x8                0.678    0.069    9.841    0.000
   .x9                0.455    0.069    6.580    0.000
    visual            0.386    0.092    4.201    0.000
在 R 中使用 lavaan 的結構方程模型

一起來練習吧!

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

Preparing Video For Download...