Tutorials › Optimal Design and Model-Informed Dosing › External Validation Across Clinical Sites

Model-Informed Precision Dosing in Practice · Tutorial 388 of 497

External Validation Across Clinical Sites

Assess whether a dosing model performs adequately at a new clinical site by combining prespecified performance measures with a disciplined review of population and data differences.

Advanced 11 min read

What You'll Learn

  • Define an external validation cohort and distinguish it from data used to develop or tune a model.
  • Choose performance measures that match the model output and clinical purpose.
  • Quantify prediction error, prediction-interval coverage, and uncertainty using hypothetical site data.
  • Document differences in population, measurement practice, workflow, and data definitions.
  • Recognize when dependence, missing data, or inconsistent measurements weaken a site-level assessment.
  • Compare external validation with internal validation and explain the limits of a single-site result.

Why Validate Across Sites?

A model can perform well on the data used to develop it and still produce unreliable predictions in a different hospital. A new site may treat a different patient population, collect measurements using different instruments or schedules, or encode clinical events differently. Even when the model itself is unchanged, these differences can affect the inputs it receives and the outcomes against which its predictions are evaluated.

External validation asks how a fixed model performs on eligible data from a site that did not contribute to its development or tuning. The goal is not to make the model fit the new site better. It is to obtain a credible assessment of its performance there, and to make clear what population, measurements, workflow, and data definitions that assessment represents. The earlier material on analytical validation of model predictions provides the general context for evaluating prediction performance; here, the central concern is whether the evaluation remains valid across clinical sites.

Definition: External validation across clinical sites is the evaluation of a prespecified, unchanged model using appropriately collected data from a clinical site independent of model development and tuning. Predictions are compared with defined reference outcomes using prespecified performance measures. The validation applies to the patients, care processes, measurements, and data definitions represented in that evaluation.

Set Up a Credible Site Evaluation

Before calculating a performance measure, define the prediction task precisely. Specify the intended population, prediction time, inputs available at that time, outcome and measurement window, and unit of analysis. For a dosing model, one unit might be a patient-level dosing decision with a predicted concentration and a later measured concentration. If multiple decisions or measurements come from one patient, record that structure rather than treating all rows as independent.

The model must be locked for the evaluation: its parameters, preprocessing, feature definitions, and prediction rules should be fixed in advance. Any exclusions, handling of missing inputs, outcome definitions, and primary performance measures should also be specified before examining site results. If an input is unavailable or defined differently at the new site, document how the prespecified model handled it. Changing the model, selecting a new threshold, or revising preprocessing after seeing the validation outcomes turns the evaluation into model adaptation; performance on those same data is no longer an independent assessment of the adapted procedure.

A useful site description covers four connected areas:

  • Population: eligibility, sample size, clinical characteristics relevant to the model, and how patients entered the evaluated cohort.
  • Measurements: assay or instrument, units, sampling time, measurement procedures, and whether the reference outcome matches the model’s intended target.
  • Workflow: how and when inputs were recorded, whether model-relevant values were available at prediction time, and any differences in usual care that affect the evaluated task.
  • Data definitions: coding systems, variable mappings, missing-value rules, time stamps, and operational definitions for doses, outcomes, and clinical events.

These details are not background decoration. For example, a concentration described as a predose trough is not a comparable reference outcome if the local record includes postdose samples under the same label. A performance statistic can be computed precisely and still answer the wrong question if the prediction and reference measurement do not align.

Performance Measures and Their Assumptions

For patient-level prediction occasion \(i\), let \(\hat{y}_i\) be the model prediction and \(y_i\) the corresponding reference outcome on the same scale and at the prespecified time. Define the prediction error as \(e_i=\hat{y}_i-y_i\). Positive errors indicate overprediction under this convention; negative errors indicate underprediction. Common summaries include mean error (bias), mean absolute error (MAE), and root mean squared error (RMSE):

$$ \text{Bias}=\frac{1}{n}\sum_{i=1}^{n}e_i,\qquad \text{MAE}=\frac{1}{n}\sum_{i=1}^{n}|e_i|,\qquad \text{RMSE}=\sqrt{\frac{1}{n}\sum_{i=1}^{n}e_i^2}. $$

Bias summarizes average signed error and can conceal offsetting individual errors. MAE summarizes average error magnitude in the outcome’s units. RMSE also uses the outcome’s units, but gives greater weight to larger errors because errors are squared before averaging. None is automatically the right primary measure: choose according to the prediction task and clinical consequences. If decisions depend on whether an error exceeds a clinically justified tolerance, report that proportion as well, with the tolerance defined in advance.

These summaries require correctly paired predictions and reference outcomes that represent the intended target. The simple formulas describe the observed evaluation sample; they do not by themselves provide uncertainty intervals or establish performance in every future patient at the site. If observations are independent, uncertainty for mean error can be estimated from its sample standard deviation \(s_e\) using \(SE(\bar{e})=s_e/\sqrt{n}\). A \(t\)-interval additionally relies on an appropriate sampling model and, for small samples, an approximately normal distribution of errors. With repeated observations per patient, an analysis that treats every row as independent will generally understate uncertainty; resampling or inference should preserve patient-level clusters.

Worked Example: Summarizing Errors at an Independent Site

Suppose a frozen model predicts a drug concentration in mg/L for six hypothetical, independent patient-level occasions at a new site. Predictions and reference measurements are: (12, 10), (7, 10), (14, 10), (11, 10), (8, 10), and (14, 10), where each pair is (prediction, measured value). Assume these are correctly timed measurements under the prespecified outcome definition.

The errors, prediction minus measurement, are \(2,-3,4,1,-2,4\) mg/L. Thus:

$$ \text{Bias}=\frac{2-3+4+1-2+4}{6}=\frac{6}{6}=1.00\ \text{mg/L}, $$
$$ \text{MAE}=\frac{2+3+4+1+2+4}{6}=\frac{16}{6}=2.67\ \text{mg/L}, $$
$$ \text{RMSE}=\sqrt{\frac{2^2+(-3)^2+4^2+1^2+(-2)^2+4^2}{6}} =\sqrt{\frac{50}{6}}=2.89\ \text{mg/L}. $$

The model overpredicts by 1.00 mg/L on average in this small sample, while the average absolute error is 2.67 mg/L. These are different statements: positive and negative errors partly cancel in the bias. They do not, on their own, establish acceptable clinical performance; that judgment requires prespecified, clinically meaningful criteria and appropriate uncertainty.

For illustration, the sample standard deviation of the six errors is \(s_e=\sqrt{44/5}=2.97\) mg/L, so \(SE(\bar{e})=2.97/\sqrt{6}=1.21\) mg/L. Under the additional assumptions of independent occasions and approximately normal errors, a 95% \(t\)-interval with \(df=5\) is \(1.00\pm2.571(1.21)\), or approximately \([-2.11,4.11]\) mg/L. This interval is wide; it is compatible with a modest average underprediction or overprediction. The assumptions are consequential, and six observations provide little basis for assessing the error distribution.

For a model that supplies prediction intervals, evaluate their empirical coverage as well as their width. If a nominal 90% prediction interval is \([L_i,U_i]\), occasion \(i\) is covered when \(L_i\leq y_i\leq U_i\). The observed coverage is the number covered divided by the number evaluated. Its interpretation depends on valid reference outcomes and the prespecified prediction task; nominal coverage is a repeated-sampling target, not a guarantee that a particular patient’s outcome lies in the interval.

Worked Example: Evaluating Prediction-Interval Coverage

At a hypothetical external site, a model produces a nominal 90% prediction interval for each of 40 independent patient-level occasions. The reference outcome falls within the interval for 34 occasions. The observed coverage is:

$$ \hat{p}=\frac{34}{40}=0.850=85.0\%. $$

To show sampling uncertainty, use a 95% Wilson interval for a binomial proportion. With \(z=1.96\), \(n=40\), and \(\hat{p}=0.85\), the interval is:

$$ \frac{\hat{p}+\frac{z^2}{2n}\ \pm\ z\sqrt{\frac{\hat{p}(1-\hat{p})}{n}+\frac{z^2}{4n^2}}} {1+\frac{z^2}{n}} = \frac{0.8980\ \pm\ 0.1206}{1.0960} \approx [0.709,0.929]. $$

The observed coverage is 85.0%, and the approximate 95% Wilson interval is 70.9% to 92.9%. This is substantial uncertainty: the sample alone does not pinpoint the site’s coverage precisely. The interval is a confidence interval for a binomial coverage proportion under the independence assumption, not a probability statement about the true coverage. If occasions are repeated within patients, the binomial calculation must be replaced by an approach that accounts for clustering.

Separate Performance from Site Composition

An overall site metric depends both on how predictions perform within patient groups and on how common those groups are at that site. Therefore, report relevant population characteristics and, where sample size permits, performance by prespecified clinically relevant strata. This can reveal whether a site-wide summary reflects a different mix of patients rather than a uniform change in performance. Small subgroup estimates are uncertain, so they should not be presented as definitive rankings.

Worked Example: Showing the Effect of Patient Mix

Consider a hypothetical site with two prespecified renal-function groups. Among eight patients in the lower-function group, the MAE is 4.0 mg/L; among two patients in the higher-function group, it is 1.0 mg/L. The pooled site MAE is the sample-size-weighted average:

$$ \text{MAE}_{\text{site}}=\frac{8(4.0)+2(1.0)}{10} =\frac{34}{10}=3.40\ \text{mg/L}. $$

For comparison only, suppose the development data had equal proportions in these groups. Reweighting the site’s two group-specific MAEs to that 50:50 composition gives \(\{0.5(4.0)+0.5(1.0)\}=2.50\) mg/L. The difference between 3.40 and 2.50 mg/L illustrates how an overall summary changes with group proportions. It does not prove that patient mix caused the difference, nor does this small example establish performance for either group. The group definitions, sample sizes, and uncertainty should accompany any such comparison.

Diagnostics, Alternatives, and Limits

Before interpreting performance, check whether the evaluation data support the intended comparison. Verify that predictions were generated by the locked model, that each prediction is paired with the correct patient and outcome time, and that units and transformations agree. Examine the counts and reasons for excluded records, missing inputs, and missing outcomes. Compare local measurement schedules and definitions with the protocol. A strikingly large error can reflect a genuine model limitation, but it can also signal a time-alignment, unit-conversion, or coding problem; investigate data provenance without silently changing the prespecified analysis.

External validation has a different role from the main alternatives. Internal validation, such as resampling within development data, estimates performance under reuse of the development source and can help assess optimism, but it does not independently test a new site’s data practices. A held-out site evaluation directly assesses performance in that site’s evaluated setting, but a single site cannot establish performance in all hospitals. Local model updating may be considered if performance is inadequate, but the data used to update should not then be described as an independent test of the updated model.

A site evaluation also has limits that a clean metric cannot remove. A small cohort yields imprecise estimates; selective availability of measurements can make the evaluated cases unrepresentative; and a site’s workflow may change which patients receive measurements or when they are taken. Differences in population, measurement, workflow, and definitions should be reported rather than collapsed into a single claim that the model “works” or “fails” at the site. The result supports a bounded conclusion about the evaluated data and task.

Common pitfall: “The site’s MAE is higher, so the model is intrinsically worse there.” This conclusion is too strong without checking whether the outcome, measurement timing, units, input definitions, and patient mix are comparable. Report the observed performance, investigate data and cohort differences, and limit conclusions to what the evaluation can support. Do not alter the model on the validation outcomes and still call the resulting estimate independent validation.

A Practical Reporting Sequence

1
Lock the evaluation.
Record the model version, inputs, outcome, time window, eligible population, exclusions, and primary performance measures before examining results.
2
Describe the site data.
Report cohort flow, patient characteristics, measurement procedures, workflow, data definitions, and missingness relevant to the prediction task.
3
Check pairing and comparability.
Verify units, time alignment, source records, and the correspondence between each prediction and its reference outcome.
4
Estimate performance with uncertainty.
Report prespecified metrics in context and use uncertainty methods that respect the independent unit or patient-level clustering.
5
Bound the conclusion.
State which site, population, workflow, and definitions were evaluated, and identify differences that limit interpretation or generalization.

Check Your Understanding

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

  1. A site contributes records to feature selection and later supplies a “held-out” test set for the final model. Is that test set an independent external validation set? Why?
  2. For three hypothetical occasions, errors defined as prediction minus measurement are \(-2, 1,\) and \(4\) mg/L. Calculate bias and MAE.
  3. A nominal 95% prediction interval covers 18 of 20 independent outcomes. What is the observed coverage, and what does it not establish?
  4. Why should a report distinguish a predose concentration from a concentration measured at an unspecified time after dosing, even if both are stored in the same database field?

Solutions. (1) No. Because the site data contributed to feature selection, they influenced model development; the set is not independent of the development process. (2) Bias is \((-2+1+4)/3=1.00\) mg/L. MAE is \((2+1+4)/3=2.33\) mg/L. (3) Observed coverage is \(18/20=90.0\%\). This small sample does not establish that the underlying coverage is exactly 90%, nor does it guarantee coverage for any individual outcome. (4) The measurements represent different sampling conditions and may not be the same target. Treating them as interchangeable can make the prediction-reference comparison invalid, regardless of the database label.

Clinical Biostats