Model selection with AIC

Analytika TeamLast reviewed 5 min read

Adding parameters always improves a model’s fit to the data in hand, but not necessarily its ability to describe new data. Information criteria such as AIC and BIC reward fit while penalising complexity, so you can compare candidate models on an even footing.

The formulas

  • AIC = 2k − 2 log L
  • BIC = k × log(n) − 2 log L

k is the number of estimated parameters, L the maximised likelihood and n the sample size. BIC’s penalty grows with n, so it favours simpler models more than AIC does.

Interpreting differences

ΔAIC from the best modelSupport for the other model
0–2Substantial: essentially equivalent
4–7Considerably less
> 10Essentially none

These are Burnham and Anderson’s (2002) widely used guidelines.

Worked example: Poisson vs negative binomial

For yarn breaks in R’s warpbreaks data (predicted by wool type and tension):

ModelAIC
Poisson regression493.1
Negative binomial regression408.8

ΔAIC ≈ 84, overwhelming support for the negative binomial model, consistent with the overdispersion the Poisson model showed. See Poisson and negative binomial regression.

Rules for using AIC

  • Same data, same outcome: models must be fitted to exactly the same observations. Different missing-data exclusions make AICs incomparable.
  • No absolute meaning: an AIC of 16 or 400 means nothing on its own. The logistic model of transmission type in mtcars has AIC 16.1 and BIC 20.5, useful only for comparison with rival models of the same data.
  • Candidate models from theory: comparing a few plausible models is good practice. Searching thousands of predictor combinations for the lowest AIC is data dredging, just like stepwise regression.
  • AIC or BIC? AIC aims at predictive accuracy. BIC aims to identify the “true” model when it’s among the candidates. They often agree. When they don’t, report both.

Alternatives

For nested models, a likelihood-ratio test (or the F test for R² change) gives a formal test. Cross-validation estimates out-of-sample performance directly.

References

  • Burnham, K. P., & Anderson, D. R. (2002). Model selection and multimodel inference (2nd ed.). Springer.

More in Regression

Run this on your own data

Upload a dataset and ask your question in plain English. Analytika checks the assumptions, picks the test, runs it, and writes the results up in APA format.

Try it free