Tutorials › Pharmacokinetic-Pharmacodynamic (PK/PD) Modeling › Diagnosing Model-Averaged Predictions with Calibration and Weight Checks

Model Selection and Averaging · Tutorial 488 of 598

Diagnosing Model-Averaged Predictions with Calibration and Weight Checks

Evaluate whether model-averaged predictions are calibrated and whether their uncertainty and model weights warrant confidence.

Advanced 12 min read

What You'll Learn

  • Define calibration for model-averaged predictions and distinguish average bias from calibration slope.
  • Calculate and interpret empirical predictive-interval coverage.
  • Check calibration and coverage across clinically meaningful subgroups.
  • Quantify model-weight concentration using an effective number of contributing models.
  • Recognize why validation data must be kept separate from data used to fit models or choose weights.
  • Use multiple diagnostics to identify warning signs without treating any one measure as proof of model adequacy.

Why Diagnose the Averaged Prediction?

A model-averaged prediction combines predictions from several candidate PK/PD models. Combining models can reduce dependence on a single fitted structure, but the average is not automatically accurate, calibrated, or adequately uncertain. A weighted prediction may be systematically too high, work well overall but poorly for a clinically important subgroup, or appear to use many models even though one model supplies nearly all the weight. Diagnostics should therefore examine both the predictions and the weights that produced them.

The diagnostics in this tutorial apply to predictions evaluated against outcomes not used to fit the candidate models or determine the averaging weights. For repeated PK/PD data, the validation split should respect the unit of prediction: when the intended use is prediction for new individuals, keep all records from an individual together. Subject-level cross-validation is one way to obtain such predictions. Reusing the fitting data can make calibration and coverage appear better than they will be for new observations.

Definition: For observation \(i\), let \(y_i\) be the observed outcome, let \(\hat{y}_{im}\) be candidate model \(m\)'s prediction on the same outcome scale, and let \(w_m\) be its averaging weight. A model-averaged point prediction is \(\hat{y}_i=\sum_{m=1}^{M}w_m\hat{y}_{im}\), where \(w_m\geq 0\) and \(\sum_{m=1}^{M}w_m=1\). The prediction error, using the sign convention in this tutorial, is \(e_i=y_i-\hat{y}_i\).

The outcome and prediction must refer to the same quantity, time, and scale. For example, a prediction of a change from baseline cannot be directly averaged with a prediction of the absolute response unless both are first expressed as predictions of the same estimand. The weights may come from a model-averaging procedure such as Bayesian model averaging or predictive stacking, but the diagnostics below assess the resulting predictions rather than establish that one weighting method is universally preferable.

Calibration: Are Predicted Values on Target?

Calibration compares predictions with outcomes. For a continuous response, a basic summary is the mean prediction error, also called calibration-in-the-large with this sign convention. A positive value means observed outcomes exceed predictions on average; a negative value means predictions exceed outcomes on average. This summary can miss patterns in which predictions are too low in one range and too high in another.

$$ \bar{e}=\frac{1}{n}\sum_{i=1}^{n}(y_i-\hat{y}_i) $$

A calibration plot can show observed outcomes against predicted values, often using groups of predictions to make the pattern visible. The ideal reference is equality: observed values track predicted values. A complementary linear calibration summary regresses observed outcomes on predictions, \(y_i=a+b\hat{y}_i+\epsilon_i\). The ideal values are \(a=0\) and \(b=1\). An intercept away from zero indicates a systematic offset under this linear summary; a slope below one often indicates predictions that vary too much, while a slope above one often indicates predictions that vary too little. These interpretations are diagnostic, not proof of a particular model defect. They also depend on the validation sample covering the prediction range of interest.

Worked Example: Checking Average Calibration

Suppose a hypothetical validation set contains six independent patients. Their observed response and model-averaged predicted response are both measured in symptom-score points at the same visit:

PatientObserved \(y_i\)Predicted \(\hat{y}_i\)Error \(y_i-\hat{y}_i\)
112102
218162
323212
427252
532302
638362

The mean prediction error is

$$ \bar{e}=\frac{2+2+2+2+2+2}{6}=\frac{12}{6}=2.00\text{ points}. $$

On this validation set, predictions understate the observed response by an average of 2.00 points. The pattern is a constant offset: the listed outcomes equal their predictions plus 2 points, so the calibration line for these data has intercept 2 and slope 1. This small example identifies an offset but does not establish how precisely it is estimated or whether the same pattern holds across a broader population. A plot and uncertainty assessment would be needed for those judgments.

Predictive-Interval Coverage

A prediction interval expresses uncertainty about a future outcome, not just uncertainty about a model's mean prediction. For a nominal \(100(1-\alpha)\%\) predictive interval, empirical coverage is the fraction of validation outcomes that fall within their corresponding intervals. If the interval procedure is calibrated for the target population and prediction setting, its long-run coverage should be near the nominal level. A finite validation sample will not generally achieve the nominal percentage exactly.

$$ \widehat{\text{Coverage}}=\frac{1}{n}\sum_{i=1}^{n} I(L_i\leq y_i\leq U_i) $$

Here \(L_i\) and \(U_i\) are the lower and upper limits for observation \(i\), and \(I(\cdot)\) is 1 when its condition is true and 0 otherwise. For model averaging, intervals should represent the predictive distribution of the averaged procedure, including relevant outcome variability and uncertainty. Simply averaging the candidate models' lower limits and averaging their upper limits does not in general produce a valid interval for the mixture predictive distribution. The interval construction must be appropriate to the averaging method.

Worked Example: Evaluating 90% Predictive-Interval Coverage

A hypothetical subject-level validation set has 20 patients. Each has a 90% predictive interval for symptom-score change. Sixteen observed outcomes fall inside their respective intervals; four fall outside. The empirical coverage is

$$ \widehat{\text{Coverage}}=\frac{16}{20}=0.800=80.0\%. $$

The observed coverage is 10 percentage points below the nominal 90%. This is a warning that the intervals may be too narrow, the validation sample may differ from the intended prediction population, or the short sample may simply have produced a low coverage fraction by chance. It does not prove which explanation is correct. The validation patients must be independent at the relevant level, the outcomes and intervals must be defined on the same scale and time point, and the intervals must have been formed without using these outcomes. With only 20 patients, report the count as well as the percentage and avoid treating 80.0% as a precise estimate of long-run coverage.

Coverage alone is not enough. Extremely wide intervals can attain high coverage while offering little useful information. Assess interval width alongside coverage, and consider whether a clinically acceptable range of outcomes is adequately represented. Calibration plots, point-prediction error, and predictive intervals answer related but distinct questions.

Subgroup Checks and Weight Concentration

Overall summaries can conceal local failures. Where sample size and scientific purpose support it, repeat calibration and coverage checks for clinically meaningful subgroups, such as dose level, baseline severity, or a relevant covariate category. Define subgroup membership before examining results when possible. Report subgroup counts because small groups produce unstable summaries; do not interpret a noisy subgroup percentage as a definitive difference. For repeated observations, account for dependence within individuals or summarize at the independent validation unit rather than treating correlated records as independent evidence.

Worked Example: Finding a Subgroup Calibration Warning

In a hypothetical validation set, an overall mean prediction error is 0.4 response points. The 12 patients in a prespecified high-baseline-severity subgroup have total prediction error 24 points, while the other 28 patients have total error \(-8\) points. The subgroup mean errors are

$$ \bar{e}_{\text{high}}=\frac{24}{12}=2.00\text{ points},\qquad \bar{e}_{\text{other}}=\frac{-8}{28}=-0.286\text{ points}. $$

Combining both groups gives \((24-8)/40=0.400\) points, consistent with the stated overall error. Yet the overall value masks underprediction by 2.00 points in the high-severity group. This is a signal to examine that subgroup's calibration plot and predictive-interval coverage. It is not sufficient evidence that severity caused the error: differences in data composition, sampling variation, or other predictive patterns may contribute. The counts and uncertainty matter, especially for the subgroup of 12.

Weights provide a separate diagnostic. With nonnegative weights summing to one, define the effective number of contributing models as

$$ M_{\mathrm{eff}}=\frac{1}{\sum_{m=1}^{M}w_m^2}. $$

This quantity equals \(M\) when all \(M\) weights are equal and approaches 1 when one model dominates. It summarizes concentration, not predictive accuracy, model truth, or the number of scientifically distinct structures represented. Its meaning also depends on which models are in the candidate set and how their weights were obtained.

Worked Example: Quantifying Concentrated Weights

Suppose three candidate models receive hypothetical weights 0.70, 0.20, and 0.10. They sum to 1.00, as required. Their effective number is

$$ M_{\mathrm{eff}}= \frac{1}{0.70^2+0.20^2+0.10^2} =\frac{1}{0.49+0.04+0.01} =\frac{1}{0.54} =1.85. $$

Although three models contribute nonzero weight, the concentration is equivalent by this measure to about 1.85 equally weighted models. This signals that the average depends strongly on the first model. It does not show that the first model is wrong or that the average's predictions are poorly calibrated; those are empirical questions for the prediction diagnostics. A concentrated weight distribution is a reason to inspect model-specific predictions and the stability of the weights, not a stand-alone failure criterion.

Why These Checks Work—and Where They Can Mislead

The connection between average-model errors and candidate-model errors follows directly from the weights. For each validation observation, suppose all candidate predictions target the same outcome, and the weights are fixed for that prediction. Then

$$ y_i-\hat{y}_i =y_i-\sum_{m=1}^{M}w_m\hat{y}_{im} =\sum_{m=1}^{M}w_m y_i-\sum_{m=1}^{M}w_m\hat{y}_{im} =\sum_{m=1}^{M}w_m(y_i-\hat{y}_{im}), $$

where the third expression uses \(\sum_m w_m=1\). Thus the averaged prediction error is the weighted average of candidate-model errors for that observation. Opposing errors can cancel: small overall bias does not guarantee small errors for individual patients, good calibration across the prediction range, or adequate interval coverage. The derivation also explains why weights that concentrate on one candidate make the average's point prediction particularly dependent on that candidate's predictions.

For a fair evaluation, the same validation outcomes must not have been used to estimate candidate parameters, tune the weights, or select the reported diagnostic pattern. Otherwise the evaluation is optimistic. In cross-validation, each prediction and its weight construction must exclude the held-out subject when the target is a new subject. Repeatedly inspecting validation results and changing the method in response also turns that data into development data; a fresh validation set or appropriately nested resampling is then needed for an independent assessment.

A calibration plot, an empirical coverage fraction, subgroup summaries, and weight concentration complement one another. A good overall mean error cannot certify a slope near one. Nominal coverage cannot certify useful interval width. An apparently balanced weight vector cannot certify good predictions. Conversely, a warning in one small subgroup or a low effective model count should prompt investigation rather than an automatic rejection.

DiagnosticQuestion answeredImportant limitation
Calibration plot and mean errorDo predicted values align with observed outcomes, overall and across the prediction range?Visual patterns and averages can be unstable in small samples and conceal subgroup errors.
Predictive-interval coverage and widthDo intervals include outcomes at about the stated frequency, and are they informative?Coverage alone rewards overly wide intervals and is imprecise in small validation sets.
Subgroup checksDoes performance differ across clinically relevant groups?Small subgroup counts and multiple comparisons can produce noisy apparent differences.
Weight concentrationHow much does the average rely on a few candidate models?Concentration is not a direct measure of calibration or predictive performance.

Common Pitfall

A common mistake is to conclude, “The average prediction error is near zero, so the model-averaged predictions are calibrated.” The conclusion does not follow. Positive errors in one subgroup can cancel negative errors in another, and errors at low predictions can cancel errors at high predictions. Check the calibration pattern across the prediction range and relevant subgroups, then inspect interval coverage and uncertainty. Likewise, do not interpret a 90% interval as containing a particular future patient's outcome with 90% probability after observing the interval; its nominal coverage is a repeated-prediction property under the assumed prediction setting.

Model-specific diagnostics are useful for locating which candidates contribute to a pattern, while diagnostics of the averaged prediction directly evaluate the object intended for use. Neither replaces the other. Predictive cross-validation scores summarize comparative predictive performance under their validation design, but they do not by themselves show calibration at each range, subgroup, or interval level. Use these approaches as complementary evidence, with the validation design matched to the intended use.

Key takeaway: Evaluate averaged predictions on appropriately held-out data. Check calibration beyond a single average, compare empirical interval coverage with its nominal level and examine interval width, inspect prespecified subgroups, and use weight concentration to understand dependence on individual candidates. Treat every diagnostic as evidence with sampling uncertainty, not as a standalone verdict.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. On a validation set, the sum of observed-minus-predicted errors is \(-15\) points for 30 patients. What is the mean error, and what does its sign indicate?
  2. For 25 held-out patients, 21 outcomes fall within their nominal 80% predictive intervals. Calculate empirical coverage and state one reason not to treat the result as proof of calibration.
  3. Two subgroups have mean errors of 3 points and \(-3\) points, with equal sample sizes. Why could the overall mean error fail to reveal a calibration concern?
  4. Two models have weights 0.5 and 0.5. Calculate their effective number and explain what it does—and does not—measure.

Solutions. 1. The mean error is \(-15/30=-0.500\) points. Since error is observed minus predicted, predictions exceed observed outcomes by an average of 0.500 points. 2. Coverage is \(21/25=0.840\), or 84.0%. The sample is finite, so its observed coverage can differ from the nominal 80% by chance; also confirm the intervals were produced without using these held-out outcomes. 3. Equal subgroup sizes make the two mean errors cancel in the overall average, yielding zero, even though each subgroup has a systematic error in opposite directions. 4. \(M_{\mathrm{eff}}=1/(0.5^2+0.5^2)=1/0.5=2.00\). It summarizes weight concentration; it does not establish prediction accuracy or prove that either model is correct.

Clinical Biostats