選取特定配適指標
你也可以用 AIC 或 ECVI 這些配適指標來比較模型,而不必使用 anova() 函式。當你的模型包含不同的顯變數時,這些配適指標特別實用。在比較一組 AIC 或 ECVI 的數值時,最佳模型會有最小的配適指標。上一個練習中儲存的模型已為你載入。
本練習屬於課程
在 R 中使用 lavaan 的結構方程模型
練習說明
- 分別對每個模型使用
fitmeasures()計算配適指標。 - 只選取
aic與ecvi這兩個配適指標,以縮短輸出。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Analyze the original model
epi.fit <- cfa(model = epi.model, data = epi)
# Find the fit indices for the original model
# Analyze the updated model
epi.fit1 <- cfa(model = epi.model1, data = epi)
# Find the fit indices for the updated model