彙整多因子模型
你現在已建立一個包含閱讀理解與加法速度兩個因子的模型。這會比單因子模型更好嗎?在 HolzingerSwineford1939 資料集上,對你的雙因子模型使用 cfa() 與 summary() 函式,列出配適指標。
本練習屬於課程
在 R 中使用 lavaan 的結構方程模型
練習說明
- 使用
cfa()函式,將模型配適結果儲存為twofactor.fit。 - 使用
summary()函式檢視配適後的模型。 - 將單因子模型的配適指標與更新後模型進行比較。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Previous one-factor model output
summary(text.fit, standardized = TRUE, fit.measures = TRUE)
# Two-factor model specification
twofactor.model <- 'text =~ x4 + x5 + x6
speed =~ x7 + x8 + x9'
# Use cfa() to analyze the model and include data argument
# Use summary() to view the fitted model