Why Parameter Counting Matters
Information criteria balance model fit against model complexity. For a fitted likelihood \(\ell\) and parameter count \(k\), AIC is commonly written as \(\mathrm{AIC}=-2\ell+2k\); BIC uses the same \(k\) in its penalty term. The value of \(k\) is not the number of observations, the number of subjects, or the number of output rows in a software summary. It is the number of free population-level parameters estimated in the likelihood used for the criterion.
This distinction is especially important in nonlinear mixed-effects (NLME) models. A fit may report population fixed effects, variance and covariance components, residual-error parameters, and a subject-specific empirical Bayes estimate for every individual. These are not all counted in the same way. The population parameters describe the model’s distributions and relationships; empirical Bayes estimates are subject-specific predictions of latent random effects, not additional population parameters in the marginal likelihood.
Model Components and the Counting Rule
A common NLME representation for observation \(j\) from subject \(i\) is
Here \(y_{ij}\) is the observation, \(f\) is the structural model, \(t_{ij}\) and \(x_{ij}\) denote design variables and covariates, \(\theta\) contains population fixed-effect coefficients, and \(\eta_i\) is the subject’s vector of random effects. In the usual Gaussian formulation, \(\eta_i\sim N(0,\Omega)\), and the residual errors have a specified covariance structure, potentially depending on additional parameters. The likelihood for information criteria is ordinarily the likelihood after accounting for the random-effects distribution, rather than a likelihood that treats each fitted subject-specific random effect as an unrelated population parameter.
“Free” means that the value is estimated rather than fixed in advance or determined exactly by other parameters. A parameter constrained by the model still counts if it remains an estimated scalar degree of freedom. Conversely, a displayed derived quantity does not add to \(k\) if it is fully determined by parameters already counted. For example, a reported correlation implied by a variance-covariance matrix is not a further parameter if the model estimated only a different, equivalent set of matrix coordinates.
Counting Fixed Effects and Random-Effects Covariance Parameters
Count each estimated coefficient in the population model. This includes intercepts, covariate effects, effects for treatment or occasion, and other fixed-effect coefficients. Count coefficients for each modeled structural parameter separately. A coefficient fixed to zero or supplied as known is not an estimated parameter. Changing the parameterization does not by itself change the count: a one-to-one re-expression of the same number of freely estimated quantities has the same dimension.
The random-effects covariance structure contributes its own parameters. If there are \(q\) random effects and their covariance matrix is unstructured, each of its \(q\) variances and each distinct pairwise covariance is estimated. Since the matrix is symmetric, the number of distinct entries is
Equivalently, the model may use \(q\) variances and \(q(q-1)/2\) correlations; this is the same number of free covariance parameters when all are estimated. A diagonal covariance matrix has only \(q\) estimated variances. A block structure counts the free parameters in its blocks, with no covariance parameters between blocks that are constrained to be independent.
Worked Example: Counting Fixed Effects and an Unstructured Covariance
Consider a hypothetical concentration model with two structural parameters, clearance (\(CL\)) and volume (\(V\)). The population model estimates an intercept for each parameter and a body-weight coefficient for \(CL\), for three fixed-effect coefficients in total. Both parameters have random effects, and their covariance matrix is unstructured. The residual model estimates one additive-error standard deviation.
There are \(q=2\) random effects. Their unstructured covariance matrix has \(2(2+1)/2=3\) free parameters: the variance of the \(CL\) random effect, the variance of the \(V\) random effect, and their covariance. The total is therefore
The model has \(k=7\). If the fitted marginal log-likelihood were \(\ell=-100.0\), its AIC would be \(-2(-100.0)+2(7)=200.0+14=214.0\). The number of subjects does not add to this parameter count, and neither does the number of subject-specific empirical Bayes estimates.
Residual-Error Parameters Belong in the Count
Residual error is part of the probability model for the observations, so each freely estimated residual parameter contributes to \(k\). A constant-variance additive error model commonly has one residual variance or standard-deviation parameter. A combined additive and proportional model commonly has two, one for each component. A model with an estimated serial-correlation parameter or another residual-variance parameter includes that parameter as well. Count the free quantities in the actual residual specification, not the number of residuals or diagnostic summaries reported after fitting.
Worked Example: A Block Covariance and Combined Error
Suppose a hypothetical model has four fixed-effect coefficients: an intercept and weight coefficient for \(CL\), and an intercept for each of \(V\) and absorption rate \(k_a\). Random effects are included on all three structural parameters. The \(CL\) and \(V\) random effects form an unstructured block, while the \(k_a\) random effect is independent of that block. The residual model has additive and proportional components, each with an estimated scale parameter.
The fixed-effect count is \(4\). The \(CL,V\) block has two variances and one covariance, for \(3\) parameters; the independent \(k_a\) random effect adds one variance. Thus the random-effects covariance count is \(3+1=4\). The two residual components contribute \(2\) parameters. Therefore
The zero covariances between \(k_a\) and the other random effects are constraints, not estimated parameters, so they are not counted. The additive and proportional residual scales are both counted because the model estimates both.
Why Subject-Specific Estimates Are Excluded
The random effects \(\eta_i\) describe variation between subjects under a population distribution such as \(N(0,\Omega)\). The likelihood accounts for that distribution; it estimates the population parameters in \(\theta\), \(\Omega\), and the residual model. An empirical Bayes estimate for subject \(i\) is a data-informed estimate or prediction of that subject’s latent \(\eta_i\), conditional on the fitted population model and the subject’s observations. It is not an additional freely estimated population parameter in the marginal likelihood.
Counting one empirical Bayes estimate for every subject would make \(k\) grow with the number of subjects, even though those estimates are not separate parameters of the population distribution being evaluated. It would also mix a conditional, subject-level output with the population-level parameter count used by the information criterion. If a model instead explicitly estimates subject-specific quantities as free parameters in the likelihood, the counting question depends on that likelihood’s formulation; do not assume that ordinary empirical Bayes output represents such a model.
Worked Example: Comparing Two Covariance Structures
Two hypothetical models use the same data and the same two fixed-effect coefficients, one each for \(CL\) and \(V\). Both have random effects on \(CL\) and \(V\), and one proportional residual-error parameter. Model A estimates an unstructured random-effects covariance; Model B constrains the covariance to be zero, giving a diagonal matrix. Suppose their fitted log-likelihoods are \(-120.4\) and \(-122.1\), respectively.
For Model A, the two random effects have \(2(2+1)/2=3\) covariance parameters. Its total is \(k_A=2+3+1=6\), so
For Model B, the diagonal covariance has two variances and no estimated covariance, so \(k_B=2+2+1=5\). Its AIC is
Under these hypothetical values, Model A has the lower AIC by \(254.2-252.8=1.4\). The calculation illustrates why the covariance parameter must be counted when estimated. It does not establish that the covariance is scientifically important or guarantee that the more complex structure will be preferred in another data set.
A Short Justification and a Reliable Workflow
A likelihood-based information criterion penalizes model fit according to the number of estimated parameters. For an NLME model, the population parameter vector can be viewed as a concatenation of fixed effects, covariance parameters, and residual parameters. If these components contain \(k_\theta\), \(k_\Omega\), and \(k_R\) freely estimated scalar quantities, respectively, then the dimension of that vector is their sum:
This is a parameter-space count, not a count of the observations used to estimate the vector. For an unstructured \(q\times q\) covariance matrix, symmetry gives \(q\) diagonal entries and \(q(q-1)/2\) distinct off-diagonal entries, so \(k_\Omega=q(q+1)/2\). A diagonal constraint removes the off-diagonal parameters from the count because they are no longer estimated.
Count every estimated intercept, covariate coefficient, and other fixed-effect coefficient once.
Count estimated variances and distinct estimated covariances, respecting diagonal, block, or other constraints.
Include every freely estimated variance, scale, or correlation parameter in the residual specification.
Do not add one parameter for each subject’s predicted random effects when using the population marginal likelihood.
Use the parameters estimated under the likelihood used for the criterion, then compute \(k=k_\theta+k_\Omega+k_R\).
The same population-level count enters AIC and BIC. In the common expression \(\mathrm{BIC}=-2\ell+k\ln(n)\), the \(k\) is this count; the choice of \(n\) must follow the convention appropriate to the analysis and likelihood. The count itself does not change merely because the criterion changes.
Diagnostics, Alternatives, and Common Pitfalls
A practical diagnostic is to compare a hand-count with the software’s reported parameter count, if one is available. Reconcile differences by checking which likelihood was used, whether residual or covariance parameters were estimated, whether any parameters were fixed or constrained, and whether the software’s count includes a quantity that is not part of the likelihood used for the criterion. Parameterization can affect how parameters are displayed, so count distinct free quantities rather than blindly counting output labels.
- Overcounting empirical Bayes estimates: “There are 80 subjects and two random effects per subject, so add 160 parameters.” This is incorrect for the usual marginal-likelihood information criterion. The subject-specific estimates are not 160 additional population parameters.
- Undercounting covariance terms: “There are two random effects, so the unstructured covariance contributes two parameters.” This omits the estimated covariance between them; the correct count is three.
- Ignoring the residual model: Residual scales and estimated residual correlations are parameters when freely estimated. Include them even when the output groups them under an error-model heading.
- Counting constrained values: A covariance fixed at zero is not estimated and does not add a parameter. But a covariance estimated from the data counts even if its fitted estimate happens to be close to zero.
A manual count from the model specification and a software-reported count are complementary checks, not competing definitions. When they disagree, identify the likelihood and parameterization behind each number before using either. The count is meaningful only in relation to the fitted model and likelihood; it cannot be detached from them and reused automatically for a different fit.
Check Your Understanding
Answer each question, then compare your reasoning with the solution given.
- A model estimates three fixed effects, has two independent random effects with a diagonal covariance matrix, and estimates one residual variance. What is \(k\)?
Solution: The diagonal covariance contributes two variance parameters. Thus \(k=3+2+1=6\). - There are three random effects with an unstructured covariance matrix. How many covariance parameters are estimated?
Solution: The count is \(q(q+1)/2=3(4)/2=6\): three variances and three distinct covariances. - A fit reports one empirical Bayes estimate for each of two random effects in each of 50 subjects. Should 100 be added to the usual marginal-likelihood \(k\)?
Solution: No. These are subject-specific estimates of latent random effects, not additional population-level parameters in the usual marginal likelihood. - A model has five fixed effects, a two-random-effect covariance structure with estimated variances but covariance fixed to zero, and a combined residual model with two estimated scales. Find \(k\).
Solution: The diagonal random-effects structure contributes two parameters, and the residual model contributes two. Therefore \(k=5+2+2=9\).