Tutorials › Quantitative Systems Pharmacology (QSP) › Residual Patterns as Evidence Against Mechanisms

Competing Biological Hypotheses · Tutorial 613 of 799

Residual Patterns as Evidence Against Mechanisms

Learn to read structured residuals as evidence about mechanistic inadequacy without mistaking a diagnostic pattern for proof of a particular biological explanation.

Advanced 12 min read

What You'll Learn

  • Define raw, standardized, and covariance-adjusted residuals for mechanistic model diagnostics.
  • Interpret residual sequences that suggest recovery timing or other temporal features are misrepresented.
  • Detect dose- or biomarker-dependent bias that may signal a missing mechanism or an inadequate observation model.
  • Recognize subject-level residual clustering that a pooled average can conceal.
  • Distinguish evidence of model inadequacy from proof of a specific biological mechanism.
  • Use residual plots and summaries while accounting for correlation, heterogeneity, and parameter fitting.

Why residual structure matters

A mechanistic model can match an overall mean or a collection of summary statistics and still miss important features of the data. For example, it may predict the right response magnitude but predict recovery too soon, or fit low-dose observations while consistently underpredicting responses at high doses. Such failures matter in QSP because the pattern of error can point to which biological claim deserves scrutiny.

A residual is the difference between an observed measurement and the corresponding model prediction. A residual is not itself a biological explanation: it is evidence that a model, its observation assumptions, or both may not represent the data adequately. Its interpretation depends on what was measured, the scale of the observation error, the correlation among measurements, and whether the prediction is population-level or individual-level.

Definition: For observation \(y_{ij}\) from individual \(i\) at condition or time \(j\), let \(\hat{y}_{ij}\) be the fitted model prediction on the same scale. The raw residual is \(e_{ij}=y_{ij}-\hat{y}_{ij}\). A positive residual means the model underpredicts the observation; a negative residual means it overpredicts. A standardized residual divides the residual by an appropriate measure of its standard deviation. A covariance-adjusted residual also accounts for dependence among observations.

A residual pattern is a systematic feature of residuals associated with time, dose, biomarker level, individual, or another relevant design variable. The key question is not whether residuals are exactly zero, but whether their direction, size, or sequence changes in a way the assumed model and observation process do not explain.

Choose residuals that match the data model

Before looking for biological patterns, state the assumptions that make a residual comparison meaningful. The model must produce predictions on the scale of the recorded outcome. The observation model must describe the relevant measurement variability, including changes in variance and dependence when present. Comparisons across observations should therefore use residuals on a comparable scale, rather than treating a 2-unit discrepancy as equally surprising in every assay and condition.

For independent observations with known or estimated standard deviations \(s_{ij}\), a simple standardized residual is \(r_{ij}=e_{ij}/s_{ij}\). If residuals within an individual are correlated, examining raw residuals as though they were independent can make a smooth run appear more informative than it is. One covariance adjustment is to collect a residual vector \(e_i\) and use a Cholesky factor \(L_i\) of its assumed covariance matrix \(\Sigma_i\), where \(\Sigma_i=L_iL_i^\mathsf{T}\). The transformed residual vector is \(z_i=L_i^{-1}e_i\).

This transformation has a useful justification when the mean prediction and covariance are correct and treated as known. Since \(E(e_i)=0\) and \(\operatorname{Cov}(e_i)=\Sigma_i\), it follows that \(E(z_i)=0\), and

$$ \operatorname{Cov}(z_i) =L_i^{-1}\Sigma_i(L_i^{-1})^\mathsf{T} =L_i^{-1}L_iL_i^\mathsf{T}(L_i^{-1})^\mathsf{T} =I. $$

Thus, under those assumptions, the transformed residuals have zero mean and no linear covariance. This is a diagnostic rationale, not a guarantee that residuals from a fitted nonlinear model are independent or normally distributed. Parameters estimated from the same data affect residuals; some observations can have less apparent residual variation because they helped determine the fit. In practice, inspect residuals in the model’s observation scale and, when relevant, in a standardized or covariance-adjusted form. State which form is being interpreted.

Worked Example: A Model Predicts Recovery Too Early

Suppose a hypothetical biomarker is measured in arbitrary concentration units after a perturbation. A fitted mechanism predicts return toward baseline sooner than the observations suggest. For clarity, assume the listed residual standard deviation is 1.0 unit at each time and that the measurements are independent for this illustration.

Time after perturbation (hours)ObservedPredictedRaw residual \(e=y-\hat{y}\) (units)Standardized residual \(r=e/1.0\)
28.28.00.20.2
66.96.00.90.9
125.84.51.31.3
244.03.20.80.8

For example, at 12 hours, \(e=5.8-4.5=1.3\) units and \(r=1.3/1.0=1.3\). The residuals are positive at all four times and largest during the later decline. This is consistent with the model predicting a faster fall, or earlier recovery, than observed. The sequence does not establish which biological process causes the discrepancy: a delayed feedback, a slower turnover process, or an unrepresented assay feature could produce a similar pattern.

The independence assumption was stipulated for this small illustration, not established by the table. If repeated measurements are correlated, the smooth sequence should be interpreted with that dependence in mind; four same-direction residuals are not automatically four independent pieces of evidence.

Read patterns against the biological prediction

Residuals become informative when their structure is compared with a model’s discriminating predictions. Earlier material on translating biological claims into predictions motivates asking what observable pattern a mechanism should produce. Here the diagnostic task is narrower: identify where the fitted prediction repeatedly misses and describe the mismatch without jumping directly to a preferred mechanism.

  • Time pattern. Runs of positive or negative residuals, a shift in sign around a transition, or residual magnitude that grows during recovery can indicate a missing delay, an incorrect turnover time, or another inadequately represented dynamic feature. Check that time ordering and within-subject correlation are respected.
  • Dose pattern. Residuals that change systematically with dose can indicate a wrong dose-response shape, an omitted saturation or threshold, or an exposure prediction error. Check whether the pattern remains after accounting for variance that changes with dose.
  • Biomarker pattern. Residuals that vary with biomarker level may indicate a missing state dependence or a response relationship that is too simple. Also consider whether the measurement scale or error variance changes across the biomarker range.
  • Individual pattern. Repeated residuals of one sign for some individuals and the opposite sign for others can be hidden by a pooled average. This may reflect an unmodeled subpopulation, but can also arise from an omitted covariate, individual parameter variability, or an observation problem.

Worked Example: Dose-Dependent Bias

In a hypothetical assay, the outcome is measured in response units. At each dose, three observations are summarized by their mean residual. Assume independent measurement errors with a standard deviation of 1.5 response units at all doses. The fitted model predicts the same mean at each dose group as its observed mean, except for the systematic discrepancies shown here.

Dose (mg/kg)Mean residual (response units)Standardized mean residual
10.30.3/1.5 = 0.20
101.21.2/1.5 = 0.80
302.42.4/1.5 = 1.60

At 30 mg/kg, the standardized mean residual is \(2.4/1.5=1.60\). The group means rise from 0.3 to 1.2 to 2.4 response units as dose increases, so the model increasingly underpredicts at higher doses. This is a dose-associated pattern, not by itself a test of a particular mechanism. A saturable process omitted from the model is one possible explanation; a dose-dependent assay bias or an inaccurate exposure prediction is another.

The assumed standard deviation is the individual-observation standard deviation, not the standard error of a group mean. Because each displayed value is a mean of three observations, uncertainty about that mean would also depend on the sampling design and any within-group correlation. The table is used to illustrate the direction of the pattern, not to claim formal evidence from a test.

Worked Example: Opposing Individual Residual Patterns

Suppose a hypothetical QSP model is fitted to repeated biomarker measurements from six individuals. After standardizing each residual by a 1.0-unit measurement standard deviation, the average residual across each individual’s visits is as follows:

IndividualMean standardized residual across visits
A-2.0
B-1.8
C-2.2
D2.0
E1.8
F2.2

The mean across the six individual means is \((-2.0-1.8-2.2+2.0+1.8+2.2)/6=0/6=0\). That pooled average conceals two opposing groups: the model tends to overpredict for A–C and underpredict for D–F. If the signs persist across visits within individuals, the pattern is more informative than a pooled residual mean of zero.

This pattern is compatible with an unmodeled subgroup, but six individuals cannot establish that explanation. Differences in a measured covariate, individual parameter values, or data quality should also be examined. A subgroup interpretation is stronger when a biologically plausible characteristic separates the patterns and the separation is supported by adequate observations.

How to diagnose without overinterpreting

1
Define the prediction target.
Clarify whether residuals compare observations with a population prediction or an individual-specific prediction. These answer different questions and can show different patterns.
2
Use the appropriate scale.
Plot raw residuals to see absolute discrepancies and standardized residuals to compare discrepancies relative to expected variability. If measurements are correlated, examine a covariance-aware representation as well.
3
Plot against relevant features.
Inspect residuals against time, dose or exposure, biomarker level, and individual. Preserve the design structure; do not treat repeated measurements as unrelated observations.
4
Describe the pattern before proposing a cause.
State its direction, location, and persistence. Then list plausible structural, parameter, covariate, and observation-model explanations that could produce it.
5
Check stability and alternatives.
Assess whether the pattern depends on a few influential observations, an assumed variance model, or a particular data source. Use biological knowledge and the available model-comparison evidence to judge candidate explanations.

A residual plot can reveal a mismatch that an overall fit statistic averages away. Conversely, a visually striking pattern can arise from chance, correlation, a misspecified variance model, or a small number of influential observations. Residual diagnostics complement model comparison; they do not replace it, and they do not assign a probability that a mechanism is true.

Common mistake and limitations

Common mistake: “The residuals are positive during recovery, so the data prove that delayed feedback is the mechanism.” The correction is that positive residuals show underprediction on the stated measurement scale; delayed feedback is one candidate explanation among several. A pattern can argue against the adequacy of the fitted model without uniquely identifying what should replace it.

Other failure modes include treating correlated residuals as independent, comparing unstandardized residuals across assays with very different variability, and interpreting residuals computed after fitting as if the parameters were fixed in advance. Residuals may also look unstructured because the data are sparse, the relevant time or dose range was not sampled, or the diagnostic has low ability to reveal the particular discrepancy.

The main alternatives serve different purposes. Raw residual plots show discrepancies in measurement units; standardized residuals put them relative to a variance scale; covariance-adjusted residuals address dependence under a specified covariance model. Summary measures and information criteria compress fit into a score, while predictive cross-validation assesses performance on held-out data. None of these alone identifies a biological mechanism. The most defensible conclusion is specific but limited: describe the residual feature, say which model prediction it challenges, and distinguish that evidence from the biological explanation proposed for it.

Check Your Understanding

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

  1. An observation is 12 units and its fitted prediction is 15 units. What is the raw residual, and what does its sign mean?
  2. Residuals are increasingly positive with time during recovery. State one model feature this may challenge and one alternative explanation.
  3. Two dose groups have mean residuals of 0.5 and 2.0 units, with an assumed standard deviation of 2.0 units. Calculate both standardized residuals and describe the pattern.
  4. Why can a pooled mean residual near zero conceal evidence of individual-level model inadequacy?
  5. Does a residual pattern uniquely identify a missing biological mechanism? Explain.

Solutions. 1. \(e=12-15=-3\) units; the model overpredicts by 3 units. 2. It may challenge the predicted recovery timing or turnover dynamics; a time-dependent measurement bias is one alternative. 3. The standardized residuals are \(0.5/2.0=0.25\) and \(2.0/2.0=1.00\). The model increasingly underpredicts across those groups, though two summaries alone do not establish a mechanism. 4. Individuals with positive residuals can cancel individuals with negative residuals, making the pooled average zero despite persistent within-individual bias. 5. No. The pattern is evidence of a mismatch with the fitted model and assumptions; multiple mechanisms, covariates, and observation-process explanations may produce it.

Clinical Biostats