Tutorials › Nonlinear Mixed-Effects Models (NLME) › Using AIC for Non-Nested NLME Models

Model Selection and Information Criteria · Tutorial 652 of 797

Using AIC for Non-Nested NLME Models

Use AIC to rank non-nested NLME models on a common likelihood basis, while recognizing what the ranking does—and does not—say about predictive performance.

Intermediate 11 min read

What You'll Learn

  • State the data and likelihood conditions needed for a meaningful AIC comparison.
  • Calculate AIC from a maximized log likelihood and the number of estimated parameters.
  • Interpret AIC differences and relative support without treating them as hypothesis tests.
  • Explain why AIC can compare non-nested models when a likelihood ratio test cannot.
  • Diagnose incomparable likelihoods and other reasons an AIC ranking may mislead.

Why Compare Non-Nested Models With AIC?

In pharmacometrics, two plausible NLME models may describe the same concentration data using different structural assumptions. For example, one model might describe disposition with one compartment and first-order absorption, while another uses two disposition compartments and transit absorption. If neither model is obtained from the other by fixing or removing parameters, they are non-nested. A likelihood ratio test based on a nested-model comparison is not the appropriate way to rank them.

Akaike’s information criterion (AIC) provides a different comparison. It balances fit to the observed data against a penalty for the number of estimated parameters. It can compare non-nested models, provided that their maximized likelihoods refer to the same response data and are calculated on a common likelihood basis. A lower AIC indicates a preferred trade-off within the candidate set; it does not establish that the model is true or guarantee better predictions in every setting.

Definition: For a model with maximized log likelihood \(\ell(\hat{\theta})\) and \(K\) estimated parameters, the Akaike information criterion is $$ \mathrm{AIC}=-2\ell(\hat{\theta})+2K. $$ Here \(\hat{\theta}\) is the maximum-likelihood estimate of the model parameters, and \(K\) counts the estimated parameters included in that likelihood. A smaller AIC is preferred when comparing models fit to the same data using a comparable likelihood.

Conditions for a Fair Comparison

Before calculating differences, check what likelihood each model used. In an NLME model, observations from the same subject are generally dependent through shared random effects. The likelihood should reflect the model for the observed data and that dependence. A common basis is the marginal likelihood: the subject-level likelihood contributions account for the random effects by integrating them out. The particular likelihood convention matters less than applying a comparable convention to every model being compared.

  • Same response data: Models should be fit to the same response observations, with the same handling of missing observations and censoring. A model fit after excluding difficult observations is not directly comparable to one fit using them.
  • Same likelihood basis: The likelihoods must refer to the same response scale and probability construction. For example, do not compare a marginal likelihood for one model with a conditional likelihood for another, or likelihoods based on different response transformations as if their values were directly comparable.
  • Comparable estimation: Each likelihood should be maximized successfully under the stated model. Different numerical approximations can affect the reported likelihood, so use the same suitable estimation and likelihood-approximation approach across candidates when possible.
  • Correct parameter count: \(K\) includes all estimated parameters contributing to the likelihood, not just the structural fixed effects. Depending on the model, this includes random-effect variance and covariance parameters and residual-error parameters.

AIC comparisons are usually based on maximum likelihood. Restricted maximum likelihood (REML) likelihoods are generally not suitable for comparing models that differ in their fixed-effects structure, because the restricted likelihood depends on that structure. The underlying principle is to compare like with like: a common label such as “likelihood” does not make two differently constructed likelihood values interchangeable.

Worked Example: Comparing Two Non-Nested PK Structures

Suppose a hypothetical data set contains the same concentration observations from 48 subjects, and both candidate models use the same residual-error formulation and likelihood approximation. Model A uses one-compartment disposition with first-order absorption; Model B uses two-compartment disposition with transit absorption. Assume neither model is a special case of the other. The fitted output is:

ModelMaximized log likelihoodEstimated parameters, \(K\)
A\(-206.3\)8
B\(-202.55\)11

For Model A, $$ \mathrm{AIC}_A=-2(-206.3)+2(8)=412.6+16=428.6. $$ For Model B, $$ \mathrm{AIC}_B=-2(-202.55)+2(11)=405.1+22=427.1. $$ The difference from the minimum AIC is \(\Delta_A=428.6-427.1=1.5\) and \(\Delta_B=0\). Model B has the lower AIC, despite having three more estimated parameters, because its improvement in maximized likelihood outweighs the additional penalty. The difference is small, so this comparison gives only a modest AIC preference for Model B, not a decisive scientific verdict.

For these two candidates, relative likelihoods based on the AIC differences are \(1\) for B and \(\exp(-1.5/2)=0.4724\) for A. Normalizing gives AIC weights of \(0.4724/(1+0.4724)=0.321\) for A and \(1/(1+0.4724)=0.679\) for B. These weights summarize relative support within this two-model set; they are not probabilities that the respective models are true.

Why the Penalty Is \(2K\)

AIC is motivated by the expected information loss when a fitted model is used to represent data generated from an unknown process. One way to understand its penalty is to consider the tendency of a fitted model to look better on the data used to estimate it than on new data. Estimation uses the observed data to choose parameter values, so the maximized log likelihood is optimistic as an estimate of future fit.

Under regularity conditions—such as identifiable parameters, an interior maximum, and a sufficiently informative sample—the fitted parameters' estimation error creates an approximate optimism of \(K\) units on the log-likelihood scale. The deviance scale is \(-2\) times the log likelihood, so the corresponding correction is approximately \(2K\). Adding that correction to the in-sample deviance gives the AIC formula. This is an asymptotic justification, not an exact correction for every finite or irregular NLME problem.

$$ \text{estimated predictive deviance} \ \approx\ -2\ell(\hat{\theta})+2K \ =\ \mathrm{AIC}. $$

For NLME data, repeated measurements within a subject do not automatically provide the same amount of independent information as the same number of observations from unrelated subjects. The likelihood must represent the dependence induced by the random effects. AIC uses the likelihood and parameter count supplied by the fitted model; it does not repair a misspecified dependence structure or poor likelihood approximation.

Differences, Not Just Rankings

AIC values have meaning comparatively, not as a standalone measure of model adequacy. For candidates fit on a common basis, let \(\mathrm{AIC}_{\min}\) be the smallest AIC and define \(\Delta_m=\mathrm{AIC}_m-\mathrm{AIC}_{\min}\). The candidate with \(\Delta_m=0\) is the best-ranked under AIC among those considered. The size of other differences describes their relative AIC support, but no universal cutoff transforms a difference into a test result.

A useful relative-likelihood summary is \(\exp(-\Delta_m/2)\). It compares a candidate's AIC support with that of the minimum-AIC candidate. A normalized set of these values is often called the set of Akaike weights. Both summaries depend on which candidates are included: adding or removing candidates can change normalized weights. Neither is a posterior probability, a p-value, or a measure of the probability that a model is correct.

Worked Example: How the Complexity Penalty Can Change the Ranking

Two hypothetical non-nested NLME models use the same response observations and likelihood basis. Model C has \(-2\ell=500\) and \(K=6\); Model D has \(-2\ell=493\) and \(K=10\). Model D improves the fit because its deviance is seven units smaller, but it estimates four additional parameters.

For Model C, \(\mathrm{AIC}_C=500+2(6)=512\). For Model D, \(\mathrm{AIC}_D=493+2(10)=513\). Thus Model C has the lower AIC by one unit. The fit improvement of seven units is smaller than the additional penalty of \(2(10-6)=8\) units. AIC therefore favors Model C slightly, even though Model D has the larger maximized likelihood. The result illustrates why choosing the model with the largest likelihood alone is not the same as choosing the model with the smallest AIC.

AIC Is Not a Likelihood Ratio Test

A likelihood ratio test uses the difference in maximized log likelihoods between a larger model and a nested smaller model, with a reference distribution that depends on the test's assumptions. For non-nested models, there is no general nested-model chi-square reference distribution for that difference. AIC instead applies a complexity penalty to each model's maximized likelihood and compares the resulting criteria. It does not require the models to be nested, and it does not produce a null hypothesis, a test statistic with a p-value, or a significance decision.

For two models A and B fit on the same basis, the difference can be written as $$ \mathrm{AIC}_A-\mathrm{AIC}_B = -2(\ell_A-\ell_B)+2(K_A-K_B). $$ The first term reflects relative fit; the second reflects the difference in parameter counts. This identity explains the trade-off but does not turn the AIC difference into a likelihood ratio test.

Worked Example: Ranking Three Candidate Models

Suppose three hypothetical non-nested NLME candidates are fitted to the same concentration observations, with the same likelihood approximation. Their outputs are:

Model\(-2\ell\)\(K\)AIC\(\Delta\)
E286.47300.42.4
F279.810299.81.8
G282.08298.00

The calculations are \(286.4+2(7)=300.4\), \(279.8+2(10)=299.8\), and \(282.0+2(8)=298.0\). Model G is the minimum-AIC candidate. The relative-likelihood values for E, F, and G are \(\exp(-2.4/2)=0.3010\), \(\exp(-1.8/2)=0.4066\), and \(1\). Their sum is \(1.7076\), giving normalized weights of approximately \(0.176\), \(0.238\), and \(0.586\), respectively. Within this candidate set, G has the strongest AIC support, but the weights do not establish that G is true or that it will perform best for every prediction target.

Diagnostics, Pitfalls, and Limitations

A numerical ranking is useful only after its inputs are checked. Confirm convergence and inspect whether the fitted parameters are plausible, identifiable, and consistent with the intended model. A nominally smaller AIC from a fit at a boundary, a failed optimization, or an unreliable likelihood approximation should not be accepted without investigation. Also examine whether the candidate models describe the data adequately: AIC ranks the candidates supplied, even if all of them fit poorly.

The most common mistake is to calculate AIC for two fits that do not have comparable likelihoods and then interpret the smaller number as a fair model preference. For example, changing the analyzed observations, response scale, or marginal-versus-conditional likelihood construction can change the likelihood value in ways that the AIC penalty does not correct. Verify comparability before ranking. If the likelihood bases differ, the arithmetic may be correct but the comparison is not justified.

AIC is an estimate-based selection criterion, not a guarantee of scientific plausibility, parameter precision, or successful prediction for a new population. It is sensitive to the candidate set and relies on an asymptotic approximation whose justification can be weaker in small or irregular samples. It should be read alongside model diagnostics and the scientific question, rather than treated as a substitute for them. Out-of-sample validation is a distinct way to assess predictive performance, and the validation design must match the prediction target.

Key takeaway: For non-nested NLME models, AIC enables a relative comparison without a likelihood ratio test when the models use the same response data and a common likelihood basis. Calculate \(-2\ell+2K\), report differences from the minimum, and interpret the result as a ranking within the candidates—not as a hypothesis test or proof of truth.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. Two models use the same observations and likelihood basis. Model P has \(-2\ell=160\) and \(K=5\); Model Q has \(-2\ell=154\) and \(K=9\). Calculate both AIC values and identify the lower-AIC model.
  2. Why can AIC compare two non-nested models when a standard nested-model likelihood ratio test is not the appropriate comparison?
  3. AIC weights for two candidates are 0.70 and 0.30. Does this mean the first model has a 70% probability of being true? Explain.
  4. One model is fit to all observed concentrations and another is fit after excluding several observations. Can their AIC values be directly ranked? State the key reason.

Solutions. (1) \(\mathrm{AIC}_P=160+2(5)=170\), while \(\mathrm{AIC}_Q=154+2(9)=172\); P has the lower AIC by 2. (2) AIC compares each maximized likelihood with a parameter-count penalty and does not require a nesting relationship or a likelihood-ratio reference distribution. (3) No. The weight is normalized relative AIC support among the candidates considered, not a posterior probability that the model is true. (4) No. The likelihoods are based on different response data, so their AIC values do not provide a fair like-for-like comparison.