Select Specific Fit Indices
You can also compare models by using the AIC or ECVI fit indices, rather than the anova() function. These fit indices are very useful if your models include different manifest variables. When comparing sets of AIC or ECVI values, the best model would have the smallest fit index. The saved models from the previous exercise have been loaded for you.
Diese Übung ist Teil des Kurses
Structural Equation Modeling with lavaan in R
Anleitung zur Übung
- Use
fitmeasures()to calculate the fit indices for each model separately. - Select only the
aicandecvifit indices to shorten the output.
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
# 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