開始使用免費開始

修正零自由度模型

在 SEM 模型中,識別性是核心概念,而且任何模型都應該至少有 1 個自由度。請使用上一題的 text.model,更新模型以建立一個自由度。

你應該把兩條係數路徑都標記為 a,讓它們彼此相等。lavaan 套件與 HolzingerSwineford1939 資料集都已為你載入。

本練習屬於課程

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

檢視課程

練習說明

  • text.model 中的 x5x6 兩條路徑都設為 a
  • 使用 cfa() 函式分析模型。
  • summary() 函式檢視更新後的模型。

動手互動練習

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

# Update the model specification by setting two paths to the label a
text.model <- 'text =~ x4 + x5 + x6'

# Analyze the model
text.fit <- cfa(model = ___, data = HolzingerSwineford1939)

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