比較模型
在上一個練習中,你新增了一個參數來控制 information 與 similarity 兩個顯變數之間的相關誤差。適配指標看起來比原始模型更好。不過,你應該使用 anova() 函式,以及先前提到的 aic 和 ecvi 適配指標,來判斷模型適配是否有顯著改善。
本練習屬於課程
在 R 中使用 lavaan 的結構方程模型
練習說明
- 使用
anova()函式比較wais.fit與wais.fit2兩個已估計的模型。 - 對兩個模型呼叫
fitmeasures(),並印出aic與ecvi適配指標。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Compare the models
anova(___, ___)
# View the fit indices for the original model
fitmeasures(wais.fit, c(___, ___))
# View the fit indices for the updated model
fitmeasures(wais.fit2, c(___, ___))