The Akaike Information Criterion (AIC) is a widely used ingenious tool in statistics. By having several models and comparing them to AIC scores, you can select the best one for your data. Employing AIC, allows one to make more informed choices regarding which model is best for the analysis of research. It also enhances the reliability and quality of results and findings. This article discusses when to use Akaike information criterion and how to calculate AIC scores.
Definition: Akaike information criterion
Akaike information criterion is a model-selecting, mathematical criterion that estimates the measures of different models as they relate to a certain data set. The representation usually varies when researchers use a statistical model to represent data generation, meaning some information will be lost. Akaike information criterion estimates and compares the amount of information loss that occurs in all models.
According to Hirotsugu Akaike, the formulator of the Akaike information criterion, the best fitting model for your data set should explain the greatest variation using fewer independent variables. Afterward, you fit several regression models with this formula and compare each AIC score.
Note: It’s important to understand that Akaike information criterion scores are not significant alone. You must compare them with another model for accuracy.
When to use the Akaike information criterion
Keep in mind the following two aspects when using the Akaike information criterion:
Model selection
When choosing the best model, you must have several options, compare them against Akaike information criterion scores, and select the one with the lowest. Hence, if you compare two models explaining the same variation, the one with fewer parameters will give a lower AIC score.
Create different model sets containing combinations of the measured independent variables. For these combinations to work in the Akaike information criterion, you should do the following:
- Understand the study system and use logically connected parameters
- Use an experimental design
In a study of how “hours spent working” and “the work environment” affect work productivity levels, you select two models:
Your Akaike information criterion results are as follows:
Running your models using the Akaike information criterion test shows that model 2 has the lowest AIC score. From these results, you can select model 2 as the best model for your research.
Now, calculate the Akaike information criterion scores of the two models and compare them. The ideal model should be more than two AIC units lesser than the other model.
Most statistical software like R has functions that can quickly calculate Akaike information criterion scores.
Remember that the Akaike information criterion is relevant when the sample size exceeds the set number of parameters. However, you may have a case study with a sample size relative to the parameters or even lesser. Consider other model selection methods, like the Bayesian Information Criterion (BIC).
AIC scores
These scores measure the relative quality of models that are compared against each other using the Akaike information criterion test.
The main purpose of the AIC score is to help you determine the best machine learning (ML) model for a particular data set, which is essential when you can’t test the data set easily.
Suppose you want to predict a person’s weight using age and height. You create two models and use the Akaike information criterion as follows:
Feeding the two models to a dataset of 1,000 observations, you find these AIC scores:
Select model 2 as the better-fitting model for the data variation from the above scores.
How to calculate Akaike information criterion
Calculating the Akaike information criterion value involves understanding several aspects, as outlined below:
Use the following formulae to calculate the Akaike information criterion:
AIC = 2K – 2 In(L)
Where:
- K: number of independent variables
- In(L): Log-likelihood of your model (this value tells you how likely the model fits the data)
Akaike information criterion will overfit the collected data when the sample size is small. It will select a complex model that would not generalize to new data. To address this issue, you can use the Akaike information criterion with a correction for small sample sizes (AICc).
Suppose you’re conducting a study to identify the variations in Body Mass Index (BMI) using sugar-sweetened beverage data. You create different models to determine how age, beverage consumption, and sex leads to these variations. So, you create several models, compare them, and fit in the three predictor variables (age, beverage consumption, and sex).
To begin, you create models to test how the variables work on their own, as follows:
Then, you create models to test how the variables work when combined:
Finally, you create a model that explains the interaction of sex, beverage consumption, and age with BMI:
Interpreting Akaike information criterion results
After running these models on R, you’ll get the following output used to interpret the results:
According to the Akaike information criterion, the best model for the data is always listed first, and it contains the following information:
- K: The number of parameters
- AICc: The AIC information for a small size sample
- Delta_AICc: The AIC score difference between the high-quality model and another one
- AICcWt: The proportion of the predictive power of the complete data set
- Wt: The sum of the AICc weights
- LL: The log-likelihood of your model
From the above results, the best model is the combinations model, which has a lesser Akaike information criterion score.
FAQs
Unfortunately, AIC can only provide a relative test of the model quality. Therefore, the Akaike information criterion will not indicate it if you have statistically unsatisfactory models.
You can use this tool in various circumstances, like when:
- You need more data to test the results’ accuracy
- You have a problem statement and have collected the necessary variables
- Ensure the variables are important indicators for your problem
One or more independent variables make up a model. During the Akaike information criterion, researchers use their predicted interactions to determine variation in their corresponding dependent variables.