Tutorials › Pharmacometric Workflows and Reproducible Modeling › Conditional and Individual Prediction Plots

Automating Diagnostics and Reports · Tutorial 284 of 399

Conditional and Individual Prediction Plots

Learn what conditional and individual predictions represent, how to plot them against observations, and what these plots can—and cannot—show about a fitted pharmacometric model.

Intermediate 10 min read

What You'll Learn

  • Define population and conditional individual predictions in a nonlinear mixed-effects model.
  • Match each observation to the prediction for the same subject and sampling time.
  • Interpret departures from the equality line in the context of individual-level fit.
  • Explain why conditional plots may look better because subject data informed the predictions.
  • Recognize sparse-data, shrinkage, scale, and implementation limitations.

Why Compare Observations With Conditional Predictions?

A population prediction describes the model's expected response for a subject with typical random effects. It is useful for asking whether the population model captures the broad pattern in the data. But a population prediction does not use a subject's estimated random effects to represent that subject's individual trajectory. An observed-versus-conditional-prediction plot makes that subject-specific comparison: each observed response is paired with the prediction conditional on the fitted model and the subject's information.

This distinction matters when a model allows subjects to differ in parameters such as clearance or volume. A population prediction can miss a subject's observations in a consistent direction even when the model's subject-specific predictions track that subject more closely. Conversely, an apparently close conditional fit does not by itself show that the population model is adequate: the subject-specific estimates were informed by the same observations being plotted.

Definitions and Assumptions

For subject \(i\) at observation time \(t_{ij}\), consider a nonlinear mixed-effects model with a structural prediction \(f(t_{ij}, x_{ij}, \theta, \eta_i)\). Here \(x_{ij}\) denotes known design or covariate information, \(\theta\) denotes population parameters, and \(\eta_i\) denotes subject \(i\)'s random effects. An observation model relates the measured response \(Y_{ij}\) to this structural prediction and to residual variability. For example, under an additive observation model, \(Y_{ij}=f(t_{ij},x_{ij},\theta,\eta_i)+\epsilon_{ij}\), where \(\epsilon_{ij}\) has mean zero under the model.

Definition: The population prediction, often called PRED, is the model prediction evaluated at the typical random-effect value, conventionally \(\eta_i=0\): \( \mathrm{PRED}_{ij}=f(t_{ij},x_{ij},\theta,0) \). The conditional individual prediction, often called IPRED, is the plug-in prediction evaluated using an estimate of the subject's random effects, such as an empirical Bayes estimate \(\hat{\eta}_i\): \( \mathrm{IPRED}_{ij}=f(t_{ij},x_{ij},\theta,\hat{\eta}_i) \). Both predictions are on the response scale unless a plot explicitly states otherwise.

The word “conditional” signals that the subject-specific prediction depends on information used to estimate that subject's random effects. In the conventional plug-in definition above, \(\hat{\eta}_i\) is estimated from the fitted model and that subject's observations. Software may offer related quantities, such as a prediction averaged over a conditional distribution of random effects. A report should state which quantity it uses; values from different definitions need not agree.

The plot assumes that observed responses and predictions refer to the same response variable, are on the same scale, and are matched to the same subject, occasion, time, and record type. Model parameters and random-effect estimates must come from a defined fit, and the plotted observations should be the records represented by those predictions. If observations are censored, below quantification limits, or otherwise transformed, they cannot be treated as ordinary measured points without accounting for that status. These requirements concern a valid comparison; they do not imply that the model itself is correct.

Constructing and Reading the Plot

Place IPRED on the horizontal axis and the corresponding observed response on the vertical axis. Draw the equality line, \(y=x\), using the same numerical scale and units on both axes. A point above the line has an observed value greater than its conditional prediction; a point below has an observed value smaller than its conditional prediction. The signed vertical difference is observed minus IPRED. This description identifies the point's position; interpretation of residual patterns belongs to the relevant residual diagnostics.

Points close to the equality line indicate close agreement for those plotted records on the chosen scale. A wide spread indicates that conditional predictions and observations differ substantially for some records. A concentrated cloud around the line is not, by itself, proof of adequate population behavior, correct uncertainty, or predictive performance in new subjects. The plot is a model-fit diagnostic conditional on the analysis data, not an independent validation exercise.

Worked Example: Calculating a Population and Conditional Prediction

Suppose a hypothetical concentration model for one sampling record is \(C(t)=12\exp(-0.25t)\exp(\eta_i)\), with time in hours and concentration in mg/L. For this illustration, the population prediction sets \(\eta_i=0\), while the fitted subject-specific estimate is \(\hat{\eta}_i=-0.40\). At \(t=1\) hour, the observed concentration is \(6.8\) mg/L. Compute both predictions and locate the observation relative to each.

Population prediction. Substituting \(t=1\) and \(\eta_i=0\) gives \( \mathrm{PRED}=12\exp(-0.25)=9.34560939685686\) mg/L, or \(9.34561\) mg/L to six decimal places. The observed-minus-population-prediction difference is \(6.8-9.34560939685686=-2.54560939685686\) mg/L, approximately \(-2.546\) mg/L. Thus, the observed point is below the population prediction.

Conditional individual prediction. Substituting \(\hat{\eta}_i=-0.40\) gives \( \mathrm{IPRED}=12\exp(-0.25)\exp(-0.40)=12\exp(-0.65)=6.264549\) mg/L (approximately). The observed-minus-conditional-prediction difference is \(6.8-6.264549=0.535451\) mg/L, approximately \(0.5355\) mg/L. In the observed-versus-IPRED plot, the point is above the equality line. The two differences are not interchangeable: they compare the same observation with predictions answering different questions.

Why the Two Predictions Differ

PRED and IPRED differ because PRED evaluates the structural model at the typical random-effect value, whereas IPRED uses a subject-specific estimate. A local expansion of \(f\) around \(\eta_i=0\) makes the relationship explicit. For a scalar random effect and a small \(\hat{\eta}_i\), a first-order Taylor approximation gives:

$$ f(t_{ij},x_{ij},\theta,\hat{\eta}_i) \approx f(t_{ij},x_{ij},\theta,0) + \left.\frac{\partial f(t_{ij},x_{ij},\theta,\eta)}{\partial \eta}\right|_{\eta=0}\hat{\eta}_i. $$

The first term is PRED; the second term is the approximate subject-specific adjustment. With multiple random effects, the adjustment is the gradient with respect to the random-effect vector multiplied by that vector of estimates. This is a local approximation, not an exact equality in a nonlinear model. It explains why predictions can separate when the estimated random effects are nonzero and the response is sensitive to them.

Conditional estimates are generally informed by the subject's data as well as the population distribution assumed by the model. Consequently, IPRED can move toward the observations used to estimate \(\hat{\eta}_i\). The amount of movement depends on the data, the model, and the estimation method; it is not guaranteed that every IPRED will be closer to its observation than PRED. Nor should the plot be described as an independent test of the model.

Worked Example: Comparing Aggregate Closeness Carefully

Consider three hypothetical concentration records, all in mg/L. The fitted output gives the following values; each row is one observation paired with predictions for the same record.

RecordObservedPREDIPRED
18.410.08.8
25.16.05.4
33.02.52.8

For record 1, observed minus PRED is \(8.4-10.0=-1.6\) mg/L, while observed minus IPRED is \(8.4-8.8=-0.4\) mg/L. For record 2, the differences are \(5.1-6.0=-0.9\) mg/L and \(5.1-5.4=-0.3\) mg/L. For record 3, they are \(3.0-2.5=0.5\) mg/L and \(3.0-2.8=0.2\) mg/L.

The mean absolute difference from PRED is \((1.6+0.9+0.5)/3=1.0\) mg/L. The mean absolute difference from IPRED is \((0.4+0.3+0.2)/3=0.3\) mg/L. In this small example, the conditional predictions are closer on average to the observations. That numerical comparison describes these three records; because the same observations contributed to subject-specific estimation, it does not establish better performance for new subjects.

Interpreting the Plot in Context

Interpretation begins with the plot's purpose and construction, not with a visual verdict. Confirm the response, units, axis scales, record selection, and prediction definition. Then consider whether points tend to lie near the equality line and whether their positions differ among subjects, times, occasions, or ranges of the response. These are clues for follow-up, not a substitute for examining the model and data. A few distant points may reflect measurement error, a data-processing issue, a subject-specific mismatch, or model limitations; the plot alone cannot identify the cause.

Comparison with the observed-versus-population-prediction plot clarifies what changes. The population plot evaluates typical-subject predictions against observations. The conditional plot instead uses subject-specific estimates, so it asks whether the fitted model can represent records more closely after conditioning on each subject's data. Use the two plots as complementary views. If the conditional plot is much closer to the equality line, that may reflect meaningful subject-level information, but it may also reflect the reuse of observations during estimation. The population plot remains important for evaluating whether typical predictions align with the observed population data.

Key takeaway: An observed-versus-IPRED plot displays conditional, subject-specific agreement. It is not a replacement for a population-prediction plot, and its closeness to the equality line is not independent evidence of predictive accuracy.

Diagnostics, Failure Modes, and Limitations

A useful diagnostic check is to verify the data-to-prediction join before interpreting a figure. Each plotted record must pair an observation with the correct subject's estimate and the matching time, occasion, and response. Duplicate joins can create repeated points; mismatched identifiers can pair an observation with another subject's prediction. A plot can look plausible despite either error, so automated checks of record counts, missing predictions, identifiers, and units are valuable.

Sparse subject data require particular caution. When a subject has few informative observations, the estimate \(\hat{\eta}_i\) is typically pulled toward the population distribution; conditional predictions may then be close to PRED. This is often described as shrinkage of individual estimates. A close or narrow-looking cloud can therefore coexist with limited information about individual differences. Conversely, many observations per subject do not guarantee a good model if the structural or observation model is misspecified.

Use a common scale on both axes when drawing the equality line. If either axis is logged, make clear whether the plotted values are transformed and ensure that the equality line represents equality on that transformed scale. Log scales are not appropriate for zero or negative values without a justified transformation. Restricting axes can hide discrepancies, and pooling many records can obscure subjects with few observations or distinct trajectories; inspect the point distribution and retain enough subject and record context to understand it.

A frequent mistake is to say, “IPRED is closer to the observations, so the model has been independently validated.” The reasoning fails because the conditional estimates use information from the same subjects, often including the observations on the plot. The correction is to say that the conditional plot describes in-sample, subject-specific agreement under the stated estimation procedure. Assessing prediction for new subjects requires an appropriate validation design, not merely replacing PRED with IPRED.

Another pitfall is treating PRED and IPRED as labels that mean exactly the same thing in every software package. The conventional definitions in this tutorial are explicit, but implementations and report pipelines may calculate or name related predictions differently. Record the formula, estimation method, data records, and scale used. This reproducibility information is necessary for comparisons across reports and model runs.

Practical Workflow

1
Specify the prediction.
Record whether the plotted conditional prediction is the plug-in value \(f(t,x,\theta,\hat{\eta}_i)\) or another conditional quantity, and document the fit that produced it.
2
Match observations and predictions.
Join by subject and all relevant record identifiers, then check units, response scale, missing values, and duplicate rows.
3
Draw a comparable reference.
Put IPRED on the horizontal axis, observations on the vertical axis, and draw the equality line using equal numerical scales.
4
Interpret with the population view.
Describe subject-specific agreement while keeping in mind that conditional predictions use subject data; compare with PRED rather than treating either view as conclusive.

This workflow differs from simply choosing whichever plot looks best. The population-prediction plot emphasizes typical predictions across the population; the conditional plot emphasizes the fitted representation of individual subjects. Neither alone shows that the model will predict future observations accurately, and neither explains a discrepancy without further investigation.

Worked Example: Selecting and Interpreting Records for a Plot

A hypothetical report contains two subjects and two concentration records per subject. All values are in mg/L. The report's documented plug-in predictions are:

SubjectTime (h)ObservedIPRED
A17.27.0
A43.13.4
B15.86.2
B42.52.1

The four plot coordinates \((\mathrm{IPRED},\mathrm{observed})\), in mg/L, are \((7.0,7.2)\), \((3.4,3.1)\), \((6.2,5.8)\), and \((2.1,2.5)\). For subject A at 1 hour, the point is \(7.2-7.0=0.2\) mg/L above the equality line. For subject A at 4 hours, it is \(3.1-3.4=-0.3\) mg/L below. Subject B's corresponding differences are \(5.8-6.2=-0.4\) mg/L and \(2.5-2.1=0.4\) mg/L. All four points are within \(0.4\) mg/L vertically of the line, but that statement describes only these records and this scale.

A report should preserve the subject and time identifiers so the points can be traced back to records. It should not treat the four observations as four independent subjects or infer population performance from this small illustration. The plot shows conditional agreement for the listed records; a comparison with PRED would address a different prediction target.

Check Your Understanding

Answer each question using the definitions and cautions above.

  1. For \(f(t,x,\theta,\eta)=f\), state how PRED and plug-in IPRED differ.
  2. An observation is 4.6 mg/L and its IPRED is 5.0 mg/L. Where is the point relative to the equality line, and by how much?
  3. Why can a close observed-versus-IPRED plot not independently validate prediction for new subjects?
  4. Name two checks required before interpreting a report's observed-versus-IPRED plot.
  5. What does it suggest if IPRED is close to PRED for a subject with very few observations?

Solutions. 1. PRED evaluates the structural model at \(\eta=0\); plug-in IPRED evaluates it at the subject's estimated random effects \(\hat{\eta}_i\). 2. The point is \(4.6-5.0=-0.4\) mg/L below the line. 3. The subject-specific estimate used for IPRED is informed by the subject's data, so the plotted observations are not independent of the prediction. 4. Examples include checking that subject and record identifiers match, confirming units and response scale, and checking missing or duplicate records. 5. It may indicate that the data provide limited information to move the subject-specific estimate away from the population value; it does not prove that the subject has no individual difference.

Clinical Biostats