開始使用免費開始

建立一個自由度為 0 的模型

在第 1 章中,我們使用 HolzingerSwineford1939 資料集,以 6 個外顯變數 x4x5x6x7x8x9 建立了文字速度的模型。現在,請只用 x4x5x6 建立一個「閱讀理解」的模型。

由於只有 3 個外顯變數,估計的參數數量與可用資訊相同,因此此模型未被識別(not identified),自由度應為 0。請分析該模型並找出自由度為 0。lavaan 套件與 HolzingerSwineford1939 資料集已為你載入。

本練習屬於課程

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

檢視課程

練習說明

  • 將模型命名為 text.model,潛在變數命名為 text
  • 使用變數 x4x5x6 作為外顯變數。
  • 使用 cfa() 函式來分析模型。
  • 使用 summary() 函式查看自由度。

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# Create your text model specification
text.model <- '___'

# Analyze the model and include data argument
text.fit <- cfa(___)

# Summarize the model
summary(___, standardized = TRUE, fit.measures = TRUE)
編輯並執行程式碼