Why Two Prediction Scales Matter
A PD model can describe a population adequately while fitting a particular subject imperfectly, or it can fit individual observations after subject-specific adjustments while still missing a feature shared across the population. Residuals can help separate these questions, but only if we keep track of which prediction was used to calculate them.
A conditional prediction uses the model’s estimated subject-specific random effects. It asks how close the observation is to the fitted trajectory for that subject. A population prediction does not use that subject’s estimated random effects. It asks how the observation compares with the model’s prediction at the population level. Conditional residuals therefore emphasize individual fit; population-level residuals retain variation between subjects and can reveal patterns that individual adjustment partly conceals.
The typical-subject prediction sets random effects to zero. The marginal population mean averages predictions over the random-effects distribution. These are equal in a linear model where the random effects enter additively with mean zero, but need not be equal in a nonlinear model. In what follows, “population prediction” refers to the marginal mean when that is available; if a diagnostic uses \(f_{ij}(0)\), it should be labelled as a typical-subject comparison.
Model and Residual Scales
For a continuous response with additive, homoscedastic Gaussian residual error, suppose
Here \(\sigma^2\) is the conditional residual-error variance and \(\Omega\) is the between-subject random-effects covariance matrix. This formulation assumes the conditional mean function and random-effects distribution are specified, residual errors have mean zero and constant variance \(\sigma^2\), and records are conditionally independent given the random effects. These assumptions define the simple scales used here; a changing residual variance requires a different denominator and is addressed separately in the course.
The conditional residual is naturally standardized by the conditional residual standard deviation \(\sigma\). The population-level residual includes both residual error and variation due to random effects. For a scalar observation, its marginal predictive variance is
This is the law of total variance: average the within-subject variance, then add the variance of the conditional mean across subjects. A marginally standardized population residual divides the difference from the marginal mean by the square root of this variance. It is a scale adjustment, not a guarantee that residuals are independent standard normal values, especially in nonlinear models or when parameters have been estimated from the same data.
Worked Example: A Subject Offset Hidden by Conditional Predictions
Worked Example: A Subject Offset Hidden by Conditional Predictions
Suppose a hypothetical additive random-intercept PD model predicts a typical response of 10 units at one time and 14 units at a later time. The residual standard deviation is \(\sigma=2\) units, and the random-intercept standard deviation is 3 units. For one hypothetical subject, the observed responses are 13 and 15 units; the fitted conditional predictions are 12 and 16 units.
The conditional residuals are \(13-12=1\) unit and \(15-16=-1\) unit. Dividing by the conditional residual standard deviation gives \(1/2=0.500\) and \(-1/2=-0.500\). These residuals indicate small deviations from this subject’s fitted trajectory, with opposite signs at the two times.
The population predictions are 10 and 14 units. Thus the population-level residuals are \(13-10=3\) units and \(15-14=1\) unit. In this additive random-intercept model, the marginal mean equals the typical-subject prediction, and the marginal predictive variance is \(3^2+2^2=13\) square units. The marginal standard deviation is \(\sqrt{13}\approx3.606\) units, so the standardized population residuals are \(3/\sqrt{13}\approx0.832\) and \(1/\sqrt{13}\approx0.277\).
The two views answer different questions. The conditional residuals show that the subject’s deviations around the individual fit are modest. The population residuals show that this subject tends to respond above the typical prediction, consistent with a positive subject-level offset. That offset is not, by itself, evidence that the population mean is wrong.
Why the Two Standardizations Differ
Under the additive random-intercept model in the example, write \(Y_{ij}=\mu_{ij}+\eta_i+\epsilon_{ij}\), where \(\eta_i\) has variance \(\omega^2\) and \(\epsilon_{ij}\) has variance \(\sigma^2\). The conditional residual varies on the \(\sigma\) scale, because the subject effect is included in the conditional prediction. The population residual is \(Y_{ij}-\mu_{ij}=\eta_i+\epsilon_{ij}\), so its variance is \(\omega^2+\sigma^2\). This derivation explains why dividing both residual types by \(\sigma\) would make population residuals look artificially large whenever between-subject variation is substantial.
For a general nonlinear model, the variance of \(f_{ij}(\eta_i)\) may depend on time, dose, covariates, and the random-effects distribution. It should then be calculated under that model, often by numerical integration or simulation, rather than by assuming one constant population standard deviation. The typical-subject prediction \(f_{ij}(0)\) may also differ from the marginal mean. For example, curvature in \(f\) can make the average of subject predictions differ from the prediction at the average random effect.
Worked Example: Population-Level Residuals Across Subjects
Consider a hypothetical single-time-point analysis with population prediction 20 response units, random-intercept standard deviation \(\omega=4\) units, and residual standard deviation \(\sigma=3\) units. Three subjects have observed responses of 25, 24, and 26 units. Suppose the model’s fitted conditional predictions are 23, 22, and 24 units, respectively.
The conditional residuals are \(25-23=2\), \(24-22=2\), and \(26-24=2\) units. Their conditional standardized values are each \(2/3\approx0.667\). Relative to the individual fits, all three observations are two units above prediction.
The population-level residuals are \(25-20=5\), \(24-20=4\), and \(26-20=6\) units. Under the additive random-intercept assumptions, the marginal standard deviation is \(\sqrt{4^2+3^2}=\sqrt{25}=5\) units. The marginally standardized residuals are therefore \(5/5=1.000\), \(4/5=0.800\), and \(6/5=1.200\).
The population residuals are larger in raw units because they include subject-to-subject variation. Their standardized values are not extreme relative to the stated population predictive scale. The example illustrates why a large population residual should not automatically be read as a poor individual fit, and why standardized residuals must be interpreted against the scale appropriate to the prediction used.
Reading Patterns and Checking Model Fit
Use the two residual types together. A pattern present in conditional residuals can indicate that the fitted individual trajectories miss a feature that subject-specific random effects do not explain. A pattern in population-level residuals that largely disappears conditionally may instead reflect systematic subject offsets or an inadequate description of between-subject variability. Patterns that remain in both views deserve particular attention: they may indicate a mismatch in the population mean structure, the response-time course, or the covariate specification.
Worked Example: Separating a Subject Offset From a Trajectory Mismatch
For a hypothetical subject measured at three times, suppose the population predictions are 10, 14, and 18 units, while the observations are 12, 18, and 24 units. A fitted random-intercept model estimates a subject effect of 2 units, giving conditional predictions of 12, 16, and 20 units.
The population-level residuals are \(12-10=2\), \(18-14=4\), and \(24-18=6\) units. They increase over time. The conditional residuals are \(12-12=0\), \(18-16=2\), and \(24-20=4\) units; they also increase over time. The estimated intercept shift accounts for the initial two-unit offset, but it does not account for the growing discrepancy. The remaining conditional pattern suggests that the individual trajectory is not fully captured by the fitted model. One subject’s pattern is a diagnostic clue, not conclusive evidence of population-wide misspecification; it should be assessed across subjects and in context.
A useful diagnostic sequence is to inspect the prediction definition, plot residuals against relevant design variables, and compare patterns across subjects. Conditional residual plots are useful for within-subject deviations after individual adjustment. Population-level residual plots retain between-subject differences and are useful for assessing how observations compare with population predictions. For repeated observations, population residuals from the same subject are generally correlated because they share random effects; treating every record as independent can exaggerate the apparent amount of information.
These residuals complement rather than replace other checks. Prediction plots and simulation-based checks assess aspects of model performance that a residual plot alone may miss. Conditional predictions can look reassuring when individual estimates are flexible or strongly informed by the same observations being checked. Population predictions avoid that particular subject-specific adjustment but include genuine between-subject variability, so residuals may be broad even when the population model is reasonable.
Common Mistakes and Limitations
- Comparing raw magnitudes as if the scales were identical. Conditional residuals reflect residual error after accounting for a subject effect; population residuals also reflect between-subject variation. Use the appropriate predictive standard deviation, and retain units when reporting raw residuals.
- Calling every large population residual a population-model failure. An observation can be far from the typical prediction because its subject has an ordinary random effect. Check the marginal predictive scale and compare with conditional residuals.
- Treating a small conditional residual as proof of model adequacy. Subject-specific estimates can absorb some discrepancies, and using the same data to estimate those effects can make conditional fit look better. Check population predictions and patterns across subjects as well.
- Equating \(f(0)\) with the marginal mean in every model. This equality holds for linear additive random effects with mean zero, not generally for nonlinear functions. State which population prediction is used.
- Assuming marginal residuals are independent. Repeated records from one subject share random effects, so their population-level residuals can be correlated.
Residuals are diagnostic summaries, not definitive tests. Their interpretation depends on the model, the prediction target, the data used to estimate individual effects, and the assumed error structure. A convincing assessment combines conditional and population-level views with other checks and considers whether a pattern recurs across subjects.
Check Your Understanding
Answer each question, then compare your reasoning with the brief solutions.
- In one sentence, what does a conditional residual compare, and what does a population-level residual compare?
- In an additive random-intercept model, \(\omega=3\) response units and \(\sigma=4\) response units. What is the marginal predictive standard deviation for one observation?
- A subject’s population residuals increase across time, but conditional residuals are centered near zero with no apparent time pattern. What is one possible interpretation, and why is it not conclusive?
- Why might the typical-subject prediction \(f(0)\) differ from the marginal population mean?
- Why should repeated population-level residuals from the same subject not automatically be treated as independent?
Solutions. (1) A conditional residual compares an observation with its subject-specific fitted prediction; a population-level residual compares it with a prediction that does not use that subject’s estimated random effects. (2) The variance is \(3^2+4^2=25\) square units, so the marginal predictive standard deviation is \(\sqrt{25}=5\) response units. (3) Subject-level offsets may explain the population residual pattern, while individual fit is adequate; this is not conclusive because conditional estimates use data and the pattern must be assessed across subjects. (4) In a nonlinear model, averaging \(f(\eta)\) over random effects need not equal evaluating \(f\) at their mean: \(E_{\eta}[f(\eta)]\) may differ from \(f(E_{\eta}[\eta])=f(0)\). (5) Repeated records share the subject’s random effects, which can induce correlation between their population-level residuals.