Tutorials › Pharmacokinetic-Pharmacodynamic (PK/PD) Modeling › What a PD Residual Represents

Model Diagnostics Specific to PD · Tutorial 449 of 598

What a PD Residual Represents

Learn what an individual PD residual measures, how to calculate it, and why it cannot by itself distinguish random measurement error from a misspecified response model.

Advanced 10 min read

What You'll Learn

  • Define an individual PD residual for a response observation and state its sign and units.
  • Separate random measurement error from systematic disagreement between the model mean and the true mean.
  • Calculate and interpret residuals from simple concentration-effect predictions.
  • Explain why one residual alone cannot identify the source of a mismatch.
  • Recognize repeated response patterns that may indicate model discrepancy rather than random error.

What an Individual PD Residual Measures

A pharmacodynamic model predicts a response at a specified time and exposure, possibly conditional on a subject’s characteristics and individual parameters. Comparing that prediction with the observed response gives a direct measure of the discrepancy for that observation. The comparison is useful, but its meaning must be kept precise: a residual is a difference, not a diagnosis of why the difference occurred.

Definition: For subject \(i\) at PD observation \(j\), let \(y_{ij}\) be the observed response and let \(\hat{y}_{ij}\) be the model-based prediction on the response scale. The individual PD residual is $$ e_{ij}=y_{ij}-\hat{y}_{ij}. $$ It is positive when the observed response exceeds the prediction, negative when the observed response is below the prediction, and zero when they agree. It has the same units as the response.

The word individual indicates that this is an observation-level difference associated with a particular subject. A subject with repeated PD measurements can therefore have several residuals, one for each observation. The prediction must be identified: it may use that subject’s covariates and individual parameter values, as well as the concentration and time associated with the observation. A residual is only interpretable relative to the prediction actually used to calculate it.

For example, if a response is measured in beats per minute and the model predicts 72 beats per minute when the observed response is 75, then \(e=75-72=3\) beats per minute. The positive sign says only that the observation is three beats per minute higher than that prediction. It does not, by itself, say whether the difference reflects measurement noise, an unmodeled biological feature, an incorrect prediction, or a combination of these.

Measurement Error and Model Discrepancy

To understand the residual’s interpretation, distinguish the unknown mean response implied by the actual data-generating process from the mean response predicted by the fitted model. Write the true conditional mean for observation \(ij\) as \(m^*_{ij}\), and represent the observation as that mean plus a random deviation:

$$ y_{ij}=m^*_{ij}+\epsilon_{ij}. $$

Here \(\epsilon_{ij}\) represents observation-level variation around the true conditional mean. Depending on the study and model, it can include assay error and other random response variation not explained by the mean model. The fitted model supplies a prediction \(\hat{y}_{ij}\). Adding and subtracting \(m^*_{ij}\) gives an exact decomposition:

$$ e_{ij} = y_{ij}-\hat{y}_{ij} = \epsilon_{ij}+\left(m^*_{ij}-\hat{y}_{ij}\right). $$

The first term is the observation’s deviation from the true mean: random measurement or response variation under this representation. The second term is the difference between the true mean and the model prediction: model discrepancy. If the mean model is correct and its parameters are known, the second term is zero. If the prediction systematically misses the true mean in some part of the concentration-effect relationship, residuals in that region can show a recurring direction.

This decomposition is a way to reason about the residual, not a way to calculate the two components separately from one observation. In practice, \(m^*_{ij}\) is unknown. A single residual therefore cannot be labeled definitively as “measurement error” or “model error.” Estimating model parameters from data also affects predictions: the fitted prediction is not generally the unknown true mean, and observations used in fitting can influence their own fitted predictions.

Key interpretation: A residual is the observed response minus a specified model prediction. It combines random variation around the true mean with any difference between that true mean and the model prediction. A residual alone does not reveal which component produced it.

Worked Examples With Concentration-Effect Predictions

Worked Example: Calculating Residuals From a Linear Effect Model

Suppose a hypothetical continuous PD response \(Y\), measured in response units, is predicted by \(\hat{Y}=10+4C\), where concentration \(C\) is in mg/L. For one subject, the observed responses are 11, 17, and 33 response units at concentrations of 0, 2, and 5 mg/L. Calculate each individual residual and interpret its sign.

At \(C=0\) mg/L, the prediction is \(10+4(0)=10\) response units. Thus, $$ e=11-10=1\text{ response unit}. $$ The observation is one response unit above the prediction.

At \(C=2\) mg/L, the prediction is \(10+4(2)=18\) response units. Thus, $$ e=17-18=-1\text{ response unit}. $$ The observation is one response unit below the prediction.

At \(C=5\) mg/L, the prediction is \(10+4(5)=30\) response units. Thus, $$ e=33-30=3\text{ response units}. $$ The observation is three response units above the prediction. These three values describe three observation-level differences; their signs do not establish a systematic pattern or identify the source of any difference.

Worked Example: A Concentration-Dependent Pattern of Discrepancy

Consider a hypothetical response whose true mean follows \(m^*(C)=10+8C/(2+C)\), with response in response units and concentration in mg/L. Suppose the fitted model instead predicts \(\hat{Y}=10+3C\). For clarity, assume the three observed responses equal the true means at \(C=0\), 2, and 8 mg/L. Calculate the residuals and explain what this constructed pattern illustrates.

At \(C=0\), \(m^*(0)=10+8(0)/(2+0)=10\), and \(\hat{Y}=10+3(0)=10\). The observed response is 10, so \(e=10-10=0\) response units.

At \(C=2\), \(m^*(2)=10+8(2)/(2+2)=14\), while \(\hat{Y}=10+3(2)=16\). The observed response is 14, so \(e=14-16=-2\) response units.

At \(C=8\), \(m^*(8)=10+8(8)/(2+8)=16.4\), while \(\hat{Y}=10+3(8)=34\). The observed response is 16.4, so \(e=16.4-34=-17.6\) response units.

In this deliberately noise-free construction, each residual equals \(m^*(C)-\hat{Y}\), because \(\epsilon=0\). The increasingly negative differences at higher concentrations arise from the contrast between the saturating true mean and the fitted linear prediction. Real data would also contain random variation, so this pattern would be evidence to investigate rather than proof, from residuals alone, of a particular alternative mechanism.

Worked Example: One Residual Can Combine Two Sources

For a hypothetical PD observation measured in mmHg, suppose the true conditional mean is 22 mmHg, the observation is 21 mmHg, and the model prediction is 19 mmHg. Calculate the residual and decompose it using the true mean.

The observation’s deviation from the true mean is \(\epsilon=21-22=-1\) mmHg. The true mean minus the model prediction is \(m^*-\hat{y}=22-19=3\) mmHg. Therefore, $$ e=y-\hat{y}=21-19=2\text{ mmHg} $$ and, as the decomposition requires, $$ e=\epsilon+(m^*-\hat{y})=(-1)+3=2\text{ mmHg}. $$

The positive residual does not mean that the observation exceeded the true mean: it was one mmHg below that mean. Rather, the model prediction was three mmHg below the true mean, producing a net residual of positive two mmHg. This example shows why residual sign alone is not a label for the direction of measurement error.

Conditions and Limits of the Interpretation

The arithmetic definition \(e_{ij}=y_{ij}-\hat{y}_{ij}\) requires only an observed response and a prediction on the same scale. Interpreting the residual as a combination of random deviation and mean-model discrepancy requires a meaningful conditional mean \(m^*_{ij}\) and a representation of the observation as \(m^*_{ij}+\epsilon_{ij}\). To interpret \(\epsilon_{ij}\) as zero-mean random variation, the model’s conditioning information must be appropriate and the error representation must be reasonable. Normal errors are not required for the definition or decomposition.

The response scale matters. The basic subtraction above is on the scale of \(y_{ij}\) and \(\hat{y}_{ij}\); if a model is defined on a transformed scale, a difference calculated on that scale has a different interpretation from a difference on the original response scale. The basic residual also does not account for the expected variability of an observation. Thus, a difference of two response units might be small for a highly variable response and consequential for a very precisely measured response. Assessing that distinction requires more than the unadjusted difference.

The prediction must also match the question. A prediction based on subject-specific information and one based only on population-level information can differ. Their resulting residuals can differ too, even for the same observation. State which prediction was used rather than treating “the residual” as independent of the prediction target.

Recognizing Failure Modes

Random variation can produce positive and negative residuals even when a model’s mean structure is suitable. Conversely, a model can have meaningful systematic discrepancy even if some individual residuals are small: random variation can partly cancel the discrepancy for particular observations. The useful distinction is between an isolated difference and a recurring, interpretable pattern across relevant observations.

  • Reversing the subtraction. The convention here is observed minus predicted. Using predicted minus observed reverses every sign and changes the stated interpretation.
  • Calling the residual “the measurement error.” That equates \(e_{ij}\) with \(\epsilon_{ij}\) and silently assumes the model prediction equals the true mean. In general, \(e_{ij}=\epsilon_{ij}+(m^*_{ij}-\hat{y}_{ij})\).
  • Attributing a pattern to one cause too quickly. Residuals that tend to be negative at high concentration suggest a possible mean-model mismatch in that region, but they do not prove its cause. A concentration-linked measurement issue or another omitted feature could also contribute.
  • Ignoring the prediction used. A difference is not fully described until the prediction, its conditioning information, and the response scale are specified.
  • Treating fitted residuals as independent evidence. Parameter estimation uses data and can affect fitted predictions. Residuals from a fitted model should not automatically be treated as independent observations of pure measurement noise.

A practical first assessment asks whether differences appear to be isolated and plausibly random, or whether their direction recurs under a recognizable condition such as concentration, time, or a subject characteristic. Such a recurring pattern warrants checking whether the mean model, the data, or the assumed observation process is adequate. It does not by itself select a replacement model.

How the Residual Relates to Other Comparisons

An observed-versus-predicted comparison presents the same basic information as the residual in a different form: the point’s distance from equality corresponds to \(y_{ij}-\hat{y}_{ij}\). The residual is convenient because it records that signed difference in the response’s units. A likelihood contribution or a probability-based discrepancy instead evaluates an observation relative to a specified probability model; it is not simply the observed-minus-predicted difference. These quantities answer related but distinct questions.

The unadjusted residual is also not automatically comparable across observations with different expected variability. A larger numerical residual need not be more surprising if the corresponding response is much more variable. Adjustments for variance and other forms of residual scaling are separate constructions; they should not be confused with the definition of the individual PD residual given here.

Key takeaway: The individual PD residual is a signed, response-scale difference between one observed response and its specified prediction. It is a useful starting point for model assessment, but it is not a direct measurement of error and cannot by itself separate random variation from systematic model discrepancy.

Check Your Understanding

For each question, first state your reasoning; concise solutions follow the questions.

  1. A model predicts 6.5 response units and the observation is 5.8 response units. What is the residual, including its sign and units?
  2. In \(e_{ij}=\epsilon_{ij}+(m^*_{ij}-\hat{y}_{ij})\), what does each of the two terms represent?
  3. A set of hypothetical observations has residuals that are increasingly negative at higher concentrations. What does this pattern suggest, and what does it not establish?
  4. Can a positive residual occur when an observation is below the true conditional mean? Explain briefly.
  5. Why must the prediction and response be on a compatible scale when calculating an individual PD residual?

Solutions. (1) \(e=5.8-6.5=-0.7\) response units, so the observation is 0.7 response units below the prediction. (2) \(\epsilon_{ij}\) is the observation’s deviation from the true conditional mean; \(m^*_{ij}-\hat{y}_{ij}\) is the difference between that true mean and the model prediction. (3) It suggests a possible concentration-related systematic discrepancy in the mean model or another concentration-linked feature. It does not identify the cause or prove that the mean model is wrong. (4) Yes. In the third worked example, the observation is below the true mean, yet the residual is positive because the model prediction is even lower. (5) Subtraction is interpretable only when observed and predicted values represent the same response on the same scale; otherwise the difference does not have a clear response-scale meaning.

Clinical Biostats