Tutorials › Population Pharmacokinetics › Residual Shrinkage And Apparent Individual Fit

Diagnostics: Goodness of Fit and Shrinkage · Tutorial 362 of 599

Residual Shrinkage And Apparent Individual Fit

See why conditional residuals can appear well behaved when individual predictions adapt to the data, and compare that effect under low- and high-information sampling.

Intermediate 10 min read

What You'll Learn

  • Define residual shrinkage as a data-dependent reduction in residuals calculated from individual predictions.
  • Derive conditional residuals in a simple random-intercept model and show how their variance depends on the number of observations per subject.
  • Compare low- and high-information sampling examples using explicit residual calculations.
  • Distinguish a visually tidy conditional residual plot from independent evidence of model adequacy.
  • Recognize diagnostics and interpretation pitfalls when conditional residuals are used.

Why Conditional Residuals Can Look Too Good

A conditional residual compares an observation with a prediction that uses an individual-level parameter estimate, often an empirical Bayes estimate (EBE). That estimate is informed by the subject’s own observations. As a result, the observations help determine the prediction against which they are then compared. This feedback can pull conditional residuals toward zero, making individual fit appear better than the data independently support.

This effect is called residual shrinkage. It is related to, but distinct from, eta shrinkage: eta shrinkage concerns how individual random-effect estimates are pulled toward the population mean, while residual shrinkage concerns how residuals calculated from individual predictions may be reduced or made less variable. A tidy conditional residual plot is therefore not, by itself, strong evidence that the model describes the data well.

Definition: A conditional residual is an observed value minus its model prediction evaluated using individual-level parameter estimates. Residual shrinkage is the resulting data-dependent reduction or compression of such residuals when the observations used to assess fit also contributed to the individual predictions. Its magnitude depends on the residual definition, model, and sampling design; it is not one universal numerical property of every residual plot.

The key question is not whether conditional residuals are useful. They can reveal within-subject patterns and unusually large discrepancies. The question is what their apparent size and distribution mean when each subject’s data helped determine the fitted individual prediction.

A Simple Model Shows the Mechanism

Consider a simplified random-intercept model for one subject. After subtracting the population prediction, write the subject’s \(m\) residual-scale observations as \(r_j=\eta+\epsilon_j\), for \(j=1,\ldots,m\). Assume \(\eta\sim N(0,\omega^2)\), the observation errors are independent with \(\epsilon_j\sim N(0,\sigma^2)\), and \(\eta\) is independent of all \(\epsilon_j\). Here \(\eta\) represents a subject-level deviation and \(\epsilon_j\) an observation-level error. The variance components and population prediction are treated as known for this illustration.

Under these assumptions, the empirical Bayes estimate of the random intercept is a weighted version of the subject’s mean residual. Define \(\bar r=m^{-1}\sum_{j=1}^m r_j\). The weight \(\lambda\) increases with the amount of information in the observations:

$$ \hat{\eta}=\lambda\bar r,\qquad \lambda=\frac{m\omega^2}{\sigma^2+m\omega^2}. $$

The conditional residual for observation \(j\) is \(c_j=r_j-\hat{\eta}\). Substituting \(r_j=\eta+\epsilon_j\) and \(\bar r=\eta+\bar\epsilon\), where \(\bar\epsilon=m^{-1}\sum_j\epsilon_j\), gives

$$ c_j=(1-\lambda)\eta+\epsilon_j-\lambda\bar\epsilon. $$

This expression makes two points clear. First, the subject-level deviation in the conditional residual is multiplied by \(1-\lambda\): when the individual estimate uses more information, \(\lambda\) is larger and that component is reduced. Second, the observation-level errors do not all disappear. In particular, the residuals retain contrasts between observations within a subject.

The variance calculation quantifies this distinction. Since \(\eta\) is independent of the observation errors, and \(\operatorname{Var}(\epsilon_j-\lambda\bar\epsilon)=\sigma^2(1-2\lambda/m+\lambda^2/m)\), we obtain:

$$ \operatorname{Var}(c_j) =(1-\lambda)^2\omega^2+ \sigma^2\left(1-\frac{2\lambda}{m}+\frac{\lambda^2}{m}\right). $$

The population-prediction residual \(r_j\), before using an individual estimate, has variance \(\omega^2+\sigma^2\). Conditional residuals are not independent draws from this same marginal distribution: their shared estimate induces dependence, and their subject-level component is reduced. In the limiting case \(m=1\), \(\lambda=\omega^2/(\sigma^2+\omega^2)\), and \(c_1=(1-\lambda)r_1\). With several observations, within-subject contrasts remain, so it would be wrong to conclude that every conditional residual must become arbitrarily close to zero as information increases.

Worked Examples: Residuals at Different Information Levels

Worked Example: A Single Low-Information Observation

Suppose a hypothetical subject has one observation, the population prediction is 10 concentration units, and the observation is 11.5 concentration units. A fitted model gives an EBE of \(2/9\) concentration units for the subject’s additive deviation. The conditional prediction is therefore \(10+2/9\), and the conditional residual is:

$$ 11.5-\left(10+\frac{2}{9}\right) =1.5-\frac{2}{9} =\frac{27}{18}-\frac{4}{18} =\frac{23}{18} \approx 1.278\text{ concentration units}. $$

The observation lies 1.5 concentration units above the population prediction, but only about 1.278 units above the conditional prediction. The residual is smaller because the individual estimate moves the prediction toward the observation. This one calculation does not establish whether the model is adequate; it illustrates why a conditional residual should not be interpreted as if its reference prediction were independent of the observation.

Worked Example: Comparing Variance Under Low and Higher Information

Use the simplified random-intercept model with \(\omega^2=1\) and \(\sigma^2=4\), in squared concentration units. With one observation per subject, \(m=1\), so \(\lambda=1/(4+1)=0.2\). The conditional residual is \(c_1=0.8r_1\). Its variance is:

$$ \operatorname{Var}(c_1) =0.8^2(1+4) =3.2, \qquad \operatorname{SD}(c_1)=\sqrt{3.2}\approx1.789. $$

The population-prediction residual has variance \(1+4=5\) and standard deviation \(\sqrt{5}\approx2.236\). In this one-observation case, conditional residuals are compressed relative to those population-prediction residuals.

Now let \(m=9\). The EBE weight is \(\lambda=9/(4+9)=9/13\approx0.6923\). Applying the variance formula:

$$ \operatorname{Var}(c_j) =\left(\frac{4}{13}\right)^2(1) +4\left(1-\frac{2(9/13)}{9}+\frac{(9/13)^2}{9}\right) \approx3.692, \qquad \operatorname{SD}(c_j)\approx1.922. $$

The conditional residual standard deviation is again below the population-prediction value of about 2.236, although it is not close to zero. The comparison illustrates why “more information means every residual vanishes” is not a valid general rule: with repeated observations, individual contrasts still contribute to residual variation.

Worked Example: A Subject Mean Can Look Tidy While Contrasts Remain

Suppose a hypothetical subject has nine residuals from the population prediction, in concentration units: \(3,2,1,0,-1,0,1,2,1\). Their sum is 9, so \(\bar r=1\). Use the same variance components as above, giving \(\lambda=9/13\). The EBE is \(\hat{\eta}=(9/13)(1)=9/13\approx0.6923\) concentration units. The conditional residuals are obtained by subtracting \(9/13\) from each raw residual:

$$ \left( \frac{30}{13},\frac{17}{13},\frac{4}{13},-\frac{9}{13}, -\frac{22}{13},-\frac{9}{13},\frac{4}{13},\frac{17}{13},\frac{4}{13} \right). $$

Their mean is \((1-9/13)=4/13\approx0.3077\) concentration units, smaller than the raw mean residual of 1. The sum of squared raw residuals is 21. For the conditional residuals, subtracting the same estimate from all nine values gives:

$$ \sum_{j=1}^{9}c_j^2 =21-2\left(\frac{9}{13}\right)(9) +9\left(\frac{9}{13}\right)^2 =\frac{2172}{169}\approx12.85. $$

The conditional residuals are visibly closer to zero in aggregate, because the subject-level mean was partly absorbed into the individual estimate. Yet their range still reflects the within-subject contrasts: for example, the observation at \(-1\) remains a negative conditional residual of about \(-1.692\). A plot of conditional residuals can thus look more centered without removing every potentially informative pattern.

Reading Conditional Residual Plots Carefully

The plot’s apparent quality depends on what feature is being inspected. A subject-level offset may be less visible after the EBE adapts to that subject, while a time-related pattern among observations can remain. Consequently, a cloud centered near zero in a conditional residual plot is weaker evidence against a systematic population-level discrepancy than it might first appear. The observations have been used both to estimate the individual prediction and to assess its residuals.

When reviewing a diagnostic, state which prediction and residual definition produced it. A residual against a population prediction and a conditional residual answer different questions: the former retains between-subject deviations, while the latter evaluates observations after individual-level adaptation. If a residual has also been weighted or standardized, its scale and reference distribution depend on that definition; do not assume that all residual types have the same variance or expected distribution.

Practical interpretation: Conditional residuals can help assess within-subject fit, but their apparent centering or reduced spread may partly reflect the use of the same subject data to estimate the individual prediction. Interpret them alongside the sampling information and the residual definition, rather than as independent confirmation of fit.

A useful comparison is to examine residual behavior at more than one level of prediction, while keeping the question for each plot explicit. Population-prediction residuals retain subject-level deviations; conditional residuals show the remaining discrepancies after individual adaptation. Subject-level panels can help reveal whether a tidy overall cloud hides a small number of poorly sampled subjects or a pattern concentrated at particular times. These views are complementary, not interchangeable.

The assumptions in the derivation are deliberately simple: a single normally distributed random intercept, independent normal observation errors with constant variance, and known population prediction and variance components. Real pharmacokinetic models may have nonlinear predictions, multiple random effects, heteroscedastic observation error, or estimated population parameters. The formula above then does not directly give the residual variance. The general lesson still applies: an individual prediction estimated using the observations being checked can make conditional residuals appear more favorable. The size and pattern of that effect must be assessed for the residual type and fitted model actually used.

Diagnostics, Alternatives, and Common Pitfalls

Warning signs include conditional residuals that are markedly less dispersed than population-prediction residuals, a residual plot that looks uniformly centered despite weak information for some subjects, or a strong contrast between the two views. These are prompts for interpretation, not automatic evidence of model failure. Conversely, residual shrinkage does not prove that a model is correct; a misspecified model can still yield conditional residuals that look orderly after adaptation.

The main alternative is not to discard conditional residual plots, but to interpret them beside a view that does not use the same individual adaptation. The population-prediction residual view and subject-level panels provide different information, and sampling-design context helps explain how much weight to put on each. Simulation-based predictive checks are another broad diagnostic family, but they answer a distinct question and should not be treated as a substitute for understanding how conditional residuals were formed.

  • Mistake: “The conditional residuals are near zero, so individual fit is independently confirmed.” The observations contributed to the individual predictions. Their residuals can be reduced for that reason alone. Compare the prediction basis and consider the information available per subject.
  • Mistake: “More observations make all conditional residuals shrink to zero.” Repeated observations can improve estimation of the subject effect, but within-subject contrasts remain. The nine-observation example retains substantial residual spread.
  • Mistake: “Residual shrinkage and eta shrinkage are the same statistic.” They concern related adaptation but describe different quantities. Specify whether the reported quantity concerns random-effect estimates or residuals, and how it was calculated.
  • Mistake: “A smaller residual spread proves the model is better.” A change in spread may follow from changing the prediction from population-level to conditional, even without any improvement in independent predictive evidence.

In practice, label conditional plots clearly, note whether observations per subject are sparse or informative, and avoid treating a visually neat cloud as a standalone model-validation result. If individual plots look especially favorable for subjects whose estimates are strongly informed by their own data, that is a reason to qualify the apparent fit, not to dismiss the plots.

Key takeaway: Conditional residuals can be artificially well behaved because EBEs adapt individual predictions to the observations being checked. Their centering and spread depend on sampling information and residual construction; use them as one view of fit, not as independent proof that the model is adequate.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. In the random-intercept example, what does \(\lambda\) represent, and how does it change when \(m\) increases while the variance components stay fixed?
  2. For a subject with population prediction 8 concentration units, observation 9.2 concentration units, and EBE 0.3 concentration units, calculate the conditional residual.
  3. Why can conditional residuals have a smaller spread than residuals from the population prediction?
  4. With repeated observations, why is it inaccurate to say that every conditional residual must approach zero?
  5. Name one appropriate caution when interpreting a centered conditional residual plot.

Solutions. 1. \(\lambda\) is the weight on the subject’s mean residual in the EBE; \(m\omega^2/(\sigma^2+m\omega^2)\) increases with \(m\). 2. The conditional prediction is \(8+0.3=8.3\), so the residual is \(9.2-8.3=0.9\) concentration units. 3. The observations help determine the individual prediction, which can absorb part of their shared subject-level deviation. 4. Repeated observations retain within-subject contrasts, as shown by \(c_j=(1-\lambda)\eta+\epsilon_j-\lambda\bar\epsilon\). 5. The same observations helped estimate the individual prediction, so a centered plot is not independent evidence of model adequacy; interpret it with the sampling information and other diagnostic views.

Clinical Biostats