Section 5.10 Model Comparison With AIC
Using the
aictab() function from the AICcmodavg package ([D.1.1]), we can compare the one-way ANOVA model with the two-way ANOVA model to see what is the overall better model of understanding differences in memory scores.
# Compare one-way vs. two-way models
library(AICcmodavg)
model.set <- list(
aov(score ~ method, data = memory2),
aov(score ~ method * caffeine, data = memory2))
model.names <- c("One-way", "Two-way")
aictab(model.set, modnames = model.names)
Model selection based on AICc:
K AICc Delta_AICc AICcWt Cum.Wt LL
One-way 4 414.98 0.00 0.92 0.92 -203.13
Two-way 7 419.99 5.01 0.08 1.00 -201.92
We will review model comparisons in more detail in Section 8.9. For right now, we can just look at the AICc values. AIC values don’t test significance — they measure relative model quality. The general rule of thumb is that the lower the value, the better the model. In this case, the one-way ANOVA is the better model, confirming what the ANOVA results themselves also described.
