Tutorials › Nonlinear Mixed-Effects Models (NLME) › AICc for Small NLME Datasets

Model Selection and Information Criteria · Tutorial 653 of 797

AICc for Small NLME Datasets

Calculate and interpret AICc for NLME models, including its finite-sample penalty and the consequences of defining the observational unit differently.

Intermediate 12 min read

What You'll Learn

  • Calculate AICc from the maximized log likelihood, parameter count, and chosen sample size.
  • Explain why AICc adds a larger penalty than AIC when the sample is small.
  • Count estimated population-model parameters without treating empirical Bayes estimates as free parameters in the marginal likelihood.
  • Compare the consequences of using subjects or measurement records as the sample size.
  • Recognize when the correction is undefined, unstable, or sensitive to modeling choices.
  • Report an AICc comparison with its sample-size convention and limitations.

Why Add a Small-Sample Correction?

Akaike’s information criterion (AIC) balances model fit against the number of estimated parameters. In small datasets, however, the usual AIC penalty can be too modest: a model with many parameters may appear attractive partly because it has had more opportunity to fit the data. The small-sample corrected criterion, AICc, adds a penalty that grows as the sample size approaches the number of estimated parameters.

In an NLME analysis, that extra penalty requires care. Repeated concentration records from the same subject are not generally independent sampling units, and the phrase “sample size” can refer to different things. AICc is useful only when its parameter count and sample-size convention are stated clearly and used consistently across the models being compared.

Definition: For a model with maximized log likelihood \(\ell\), \(K\) estimated free parameters, and chosen sample size \(n\), the conventional AICc is $$ \mathrm{AICc}=-2\ell+2K+\frac{2K(K+1)}{n-K-1} $$ provided \(n>K+1\). The first two terms are AIC; the final term is the finite-sample correction.

AICc is a relative model-selection criterion: among models fitted to the same response data with comparable likelihoods, lower AICc indicates the model with the more favorable estimated fit–complexity trade-off under this criterion. It is not a probability that a model is true, nor a test of whether a particular parameter is zero. Differences in AICc are meaningful only when the models use a comparable likelihood and the same data.

What Counts as a Parameter?

For the usual marginal-likelihood AICc calculation, \(K\) counts the free parameters estimated in the model likelihood. In an NLME model this typically includes fixed-effect parameters, estimated random-effect variance and covariance parameters, and parameters of the residual-error model. If a model estimates residual variance separately for multiple components, each free variance parameter contributes to \(K\). Parameters fixed in advance rather than estimated do not contribute.

The likelihood here is the marginal likelihood: it accounts for the distribution of the subject-specific random effects rather than treating each subject’s empirical Bayes estimate as an additional freely estimated parameter. Counting those individual estimates as parameters in this calculation would mix a conditional fitting approach with the conventional marginal-likelihood AICc definition. Use the same likelihood framework and parameter-counting rules for every candidate model.

When models differ in fixed effects, comparisons are ordinarily based on maximum likelihood (ML), because restricted maximum likelihood (REML) likelihoods are not generally comparable across models with different fixed-effect design matrices. More generally, the likelihoods must represent the same response data and use compatible conventions. A change in the analyzed records, outcome definition, or likelihood scale can make a numerical AICc comparison misleading.

Worked Example: Counting Parameters and Calculating AICc

Suppose two candidate models are fitted to the same hypothetical dataset of 30 subjects using comparable marginal ML likelihoods. Model A has \(\ell=-120.0\) and \(K=6\); Model B has \(\ell=-116.8\) and \(K=9\). For this calculation, the analysis defines \(n=30\) subjects.

For Model A, $$ \mathrm{AICc}_A=-2(-120.0)+2(6)+\frac{2(6)(7)}{30-6-1} =240+12+\frac{84}{23} =255.652 $$

For Model B, $$ \mathrm{AICc}_B=-2(-116.8)+2(9)+\frac{2(9)(10)}{30-9-1} =233.6+18+\frac{180}{20} =260.6 $$

AIC alone is 252.0 for Model A and 251.6 for Model B, so AIC slightly favors Model B. With the stated \(n=30\) convention, AICc favors Model A: its AICc is lower by \(260.6-255.652=4.948\). The conclusion is conditional on the likelihood, parameter counts, and sample-size convention used; it is not evidence that Model A is necessarily the true data-generating model.

Why the Correction Grows in Small Samples

The extra term is positive when \(K>0\) and \(n>K+1\). As \(n\) becomes large relative to \(K\), the denominator grows and the correction shrinks, so AICc approaches AIC. As \(n\) approaches \(K+1\) from above, the denominator becomes small and the correction increases sharply. This reflects the concern that estimating many parameters from a limited amount of information can make apparent fit overly optimistic.

The relationship to the large-sample limit can be seen by factoring \(n\) out of the denominator. When \(n>K+1\), $$ \frac{2K(K+1)}{n-K-1} = \frac{2K(K+1)}{n}\frac{1}{1-(K+1)/n} $$ If \((K+1)/n\) is small, the expansion \(1/(1-u)=1+u+u^2+\cdots\) gives $$ \frac{2K(K+1)}{n-K-1} = \frac{2K(K+1)}{n} \left(1+\frac{K+1}{n}+\left(\frac{K+1}{n}\right)^2+\cdots\right) $$ Thus the correction becomes small as \(n\) grows, while it is amplified when \(n\) is not large compared with \(K\). This algebra explains the behavior of the penalty; it does not make the formula universally exact for every clustered-data design. Its small-sample motivation comes from correcting the tendency of estimated fit to be optimistic under specified likelihood and sampling assumptions.

Worked Example: Comparing Subject and Record Counts

Consider two hypothetical NLME models fitted to the same 120 concentration records from 24 subjects. Their comparable marginal log likelihoods and parameter counts are \(\ell_1=-300.0,\ K_1=8\) and \(\ell_2=-293.8,\ K_2=11\). The AIC values are $$ \mathrm{AIC}_1=600+16=616.0,\qquad \mathrm{AIC}_2=587.6+22=609.6 $$ so AIC favors Model 2 by 6.4 units.

If the stated AICc convention uses all 120 records as \(n\), then $$ \mathrm{AICc}_1=616.0+\frac{2(8)(9)}{120-8-1} =616.0+\frac{144}{111} =617.297 $$ and $$ \mathrm{AICc}_2=609.6+\frac{2(11)(12)}{120-11-1} =609.6+\frac{264}{108} =612.044 $$ Under that convention, Model 2 remains favored.

If instead the chosen convention uses the 24 independent subjects as \(n\), the calculation is $$ \mathrm{AICc}_1=616.0+\frac{144}{24-8-1} =616.0+9.6=625.6 $$ and $$ \mathrm{AICc}_2=609.6+\frac{264}{24-11-1} =609.6+22=631.6 $$ This convention favors Model 1 by 6.0 units. The reversal shows why the observational-unit definition is not a minor reporting detail.

In a typical NLME likelihood, records within a subject contribute jointly, and the marginal likelihood often factors across subjects under the assumption that subjects are independent. That structure makes the number of subjects a natural count of independent clusters, but repeated records also supply information about within-subject dynamics and error. There is no single universally mandated AICc sample-size convention for every NLME setting. Analysts should justify the convention in relation to the likelihood and inferential target, report it explicitly, and consider sensitivity to plausible alternatives rather than presenting one convention as an unquestionable rule.

Choosing and Reporting the Sample-Size Convention

The observational unit is the unit treated as independently sampled for the finite-sample argument behind the chosen correction. For repeated-measures pharmacokinetic data, possible conventions include the number of subjects or the total number of usable concentration records. These choices answer different questions about the sampling structure. The subject count emphasizes independent clusters; the record count treats each measurement as contributing to the sample size. Because within-subject records are correlated through shared random effects and repeated observations, the latter should not be adopted automatically as if all records were independent.

A defensible analysis should identify the convention before inspecting which model it favors. It should state the number of subjects and records, report the \(n\) used in the calculation, and keep that definition consistent across all candidate models. If the ranking changes under reasonable definitions, report that sensitivity and avoid making a strong selection claim from AICc alone. If the prediction target is explicitly subject-level, the independent-subject structure is especially relevant; the chosen convention should still be justified rather than inferred solely from the target.

Worked Example: A Correction Near Its Limit

Suppose a hypothetical candidate has \(K=10\), a maximized log likelihood of \(-80.0\), and a chosen sample size of \(n=14\). The condition \(n>K+1\) holds because \(14>11\), but only narrowly. Its AIC is $$ -2(-80.0)+2(10)=180.0 $$ and the correction is $$ \frac{2(10)(11)}{14-10-1} =\frac{220}{3} =73.333 $$ Therefore, \(\mathrm{AICc}=253.333\). The correction is large relative to AIC because the chosen sample size is close to the parameter count.

If a competing model had \(K=12\) with the same \(n=14\), its correction would be \(2(12)(13)/(14-12-1)=312\), provided its likelihood and parameter count were otherwise valid. By contrast, with \(K=13\), the denominator would be \(14-13-1=0\), so the conventional AICc would be undefined. An undefined or extremely large correction is a warning about using this formula in a setting with too little sample size relative to model complexity; it is not a reason to change \(n\) after seeing the result.

Diagnostics, Alternatives, and Limits

Before interpreting AICc, check the ingredients and assumptions that make the comparison meaningful:

  • Confirm that all models use the same outcome data and comparable marginal likelihoods.
  • Verify each parameter count from the fitted model specification, including estimated variance and covariance parameters.
  • Check that the same sample-size definition is applied across models and that \(n>K+1\) for each one.
  • Inspect whether the ranking is sensitive to a plausible alternative observational-unit definition, especially when many records come from a small number of subjects.
  • Check model fit and estimation diagnostics separately. A lower AICc does not repair a poorly identified model, an implausible residual model, or a failed likelihood optimization.

AIC is the main alternative covered in the earlier material on AIC: it uses the same fit term but omits the finite-sample correction. It may be adequate when the sample size is large relative to the number of parameters, but it can favor a more complex model when data are limited. The Bayesian information criterion (BIC) is another information criterion, but it uses a different penalty and has a separate sample-size issue; it should not be substituted into the AICc formula. Neither criterion replaces scientific judgment, diagnostics, or validation when the goal is prediction.

The conventional AICc formula is not a universal remedy for dependence, model misspecification, weak identification, or an ambiguous sampling design. Its correction is tied to particular finite-sample assumptions and a specified \(n\). With clustered NLME data, selecting the observational unit is itself a modeling judgment. AICc is most informative when that judgment is explicit, candidate models are fitted comparably, and the resulting ranking is not overinterpreted.

Common pitfall: “There are 200 concentration records, so \(n=200\) must be the right AICc sample size.” The correction can instead depend on the independent sampling units and the stated finite-sample convention. Count the records and subjects, explain which one is used and why, and check whether the model ranking changes under a defensible alternative.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. A model has \(\ell=-50.0\), \(K=4\), and chosen \(n=20\). Calculate AIC and AICc.
  2. Two models have the same log likelihood and sample size, but one has more estimated parameters. Which has the larger AICc, assuming both satisfy \(n>K+1\)? Explain.
  3. A study has 18 subjects with 6 records per subject. State two possible values of \(n\) an analyst might consider for a conventional AICc calculation and one reason the choice matters.
  4. For \(n=15\) and \(K=14\), is the conventional AICc defined? Explain.

Solutions. (1) \(\mathrm{AIC}=-2(-50.0)+2(4)=108.0\). The correction is \(2(4)(5)/(20-4-1)=40/15=2.667\), so \(\mathrm{AICc}=110.667\). (2) The model with more parameters has a larger AICc: at the same likelihood its fit term is unchanged, while both \(2K\) and the positive finite-sample correction increase with \(K\) in the valid range. (3) The possible counts are 18 subjects or \(18(6)=108\) records. Repeated records within subjects are clustered, so the choice can alter the correction and even change model rankings. The analyst must justify and report the convention. (4) No. The denominator is \(15-14-1=0\), so AICc is undefined under the conventional formula.