Skip to content
Prev 175641 / 398503 Next

model selection using ANOVA

Hi Alina,

your approach sounds problematic - you can always get a smaller RSS if 
you add terms to your model, so your approach will always go for larger 
models, and you will end up overfitting. Consider information criteria, 
e.g., AIC or BIC, which "penalize" larger models. References for AIC are 
Burnham & Anderson; other people prefer BIC.

Then you can do something like

models <- list()
AICs <- rep(NA, n)
models[[1]] <- lm(...); AICs[1] <- AIC(model[[1]])
...
models[[n]] <- lm(...); AICs[n] <- AIC(model[[n]])
which.min(AICs)

depending on your specific needs.

HTH,
Stephan


Alina Sheyman schrieb: