Tutorials › Pharmacometric Workflows and Reproducible Modeling › External Validation With An Independent Trial

Case Studies · Tutorial 388 of 399

External Validation With An Independent Trial

Use independent-trial predictions and diagnostics to identify where a locked population PK model is reliable enough for its intended purpose—and where the evidence is insufficient.

Advanced 12 min read

What You'll Learn

  • Define an independent-trial validation and distinguish it from model updating.
  • Calculate signed, percentage, absolute, and squared prediction errors and interpret their direction and units.
  • Construct and interpret a visual predictive check using the trial design and model simulations.
  • Summarize performance by clinically relevant subgroups without treating repeated samples as independent patients.
  • Identify data, design, and simulation problems that can make validation misleading.
  • Connect validation results to a prespecified decision about the model’s intended use.

Why Validate Against an Independent Trial?

A population pharmacokinetic (PK) model is often used to predict concentration profiles under a proposed dose, sampling schedule, or patient characteristic. Before relying on those predictions in a new setting, it is useful to assess them against data that were not used to develop the model. An independent-trial validation asks whether the model, as specified before examining the new concentrations, predicts relevant features of that trial.

The model must be locked for this assessment: its structural model, parameter estimates, variability model, covariate relationships, residual-error model, and prediction procedure are fixed in advance. Trial dosing, sampling times, and covariates can be supplied as inputs to generate predictions. The new observed concentrations are then used to evaluate those predictions, not to refit or tune the model. This distinction keeps validation separate from the later task of updating a model with new trial data.

Independence is more than a different file or trial name. The validation observations should not have informed model selection or parameter estimation, and the new trial should provide a meaningful test of the model in its intended use. Differences in population, dose, assay, sampling, or conduct can affect interpretation: a poor comparison may reflect a data or design mismatch as well as a model limitation.

Definition: External validation evaluates predictions from a prespecified, locked model using data from an independent study or trial. For a population PK model, validation compares predictions generated from the model and known inputs—such as dose, time, and baseline covariates—with observed concentrations that were not used to estimate or select the model. The results assess predictive performance for the evaluated setting; they do not prove that the model is valid for every population or use.

Define the Prediction Before Calculating Errors

Let \(C_{ij}\) be the observed concentration for patient \(i\) at observation time \(j\), and let \(\widehat{C}_{ij}\) be the corresponding model prediction. The prediction must be defined consistently with the intended use. For example, a population prediction based on dose and covariates is different from a prediction that uses some of the same patient’s observed concentrations to estimate that patient’s random effects. The latter can be useful for forecasting after therapeutic monitoring, but it is not a clean test of prediction from dose and covariates alone.

Before comparing values, check that the observed and predicted concentrations refer to the same patient, dose history, time origin, sampling time, and units. State how the model handles missing inputs and observations below the quantification limit. Apply the same prespecified rules to the trial data and to the simulations used for comparison. A time mismatch can look like a PK-model failure, especially where concentrations change rapidly.

Definition: The signed prediction error is \(e_{ij}=C_{ij}-\widehat{C}_{ij}\). A positive error means the prediction was below the observation; a negative error means the prediction was above it. When \(\widehat{C}_{ij}\ne 0\), the percentage prediction error is \(\%e_{ij}=100(C_{ij}-\widehat{C}_{ij})/\widehat{C}_{ij}\). If predictions are zero or near zero, percentage error is undefined or unstable; use an appropriate alternative, such as an absolute error in concentration units, and explain the choice.

Useful summaries include mean signed error, mean absolute error, and root mean squared error. The mean signed error describes average directional bias, while absolute and squared errors measure discrepancy without allowing positive and negative errors to cancel. RMSE gives greater weight to large errors. Each statistic answers a different question, so no single value is a complete validation result.

$$ \overline{e}=\frac{1}{m}\sum_{k=1}^{m}e_k,\qquad \operatorname{MAE}=\frac{1}{m}\sum_{k=1}^{m}|e_k|,\qquad \operatorname{RMSE}=\sqrt{\frac{1}{m}\sum_{k=1}^{m}e_k^2}. $$

Here \(m\) is the number of prediction-observation pairs included in the summary. If each patient contributes multiple concentrations, those pairs are correlated. Treating all of them as independent patients can make uncertainty appear smaller than it is. For patient-level inference, summarize errors within patients or use an uncertainty method that respects patient-level clustering.

Worked Example: Calculating Prediction-Error Summaries

Suppose three hypothetical trial concentrations and locked-model predictions, all measured in mg/L, are \(2.4\) versus \(2.0\), \(4.5\) versus \(5.0\), and \(12.0\) versus \(10.0\), respectively. The pairs are observed concentration followed by prediction.

The signed errors are \(2.4-2.0=0.4\), \(4.5-5.0=-0.5\), and \(12.0-10.0=2.0\) mg/L. Thus,

$$ \overline{e}=\frac{0.4-0.5+2.0}{3} =\frac{1.9}{3}=0.6333\ \text{mg/L}. $$

On average, the predictions were lower than the observations by \(0.6333\) mg/L in this small set. The mean absolute error is \(\operatorname{MAE}=(0.4+0.5+2.0)/3=0.9667\) mg/L. The root mean squared error is \[ \operatorname{RMSE} =\sqrt{\frac{0.4^2+(-0.5)^2+2.0^2}{3}} =\sqrt{\frac{4.41}{3}} =\sqrt{1.47} =1.212\ \text{mg/L}. \] Percentage errors are defined here because all predictions are nonzero: \(100(0.4)/2.0=20\%\), \(100(-0.5)/5.0=-10\%\), and \(100(2.0)/10.0=20\%\). These three observations illustrate calculations, not a conclusion about model adequacy: the sample is too small to establish performance in a trial population.

Visual Predictive Checks for the New Trial

A visual predictive check (VPC) compares the observed concentration distribution over time with distributions generated by simulating the locked model under the validation trial’s design. Simulations should reproduce relevant inputs such as dose, covariates, sampling times, and the number of patients. The simulation should include the model variability and residual-error components relevant to the observations being checked. If the simulated design does not resemble the actual trial, the plotted comparison can be misleading.

A typical VPC divides time into prespecified bins and calculates observed concentration quantiles within each bin, such as the 10th, 50th, and 90th percentiles. The same quantiles are calculated in each simulated trial. Across simulated trials, their distributions form prediction intervals for the corresponding quantiles. The plot then shows whether the observed quantiles lie in plausible regions of those simulations. Bins should be selected with attention to sample size and PK changes: sparse bins produce noisy quantiles, while overly broad bins can hide time-dependent discrepancies.

Worked Example: Reading a VPC at One Time Bin

Consider a hypothetical bin containing 40 observed patients. The observed median concentration is \(6.2\) mg/L and the observed 90th percentile is \(11.8\) mg/L. In 500 simulated trials with the same design, the central 90% simulation interval for the median is \(5.4\) to \(6.6\) mg/L, and for the 90th percentile it is \(10.5\) to \(13.0\) mg/L.

The observed median, \(6.2\) mg/L, lies inside its simulation interval because \(5.4\le6.2\le6.6\). The observed 90th percentile also lies inside its interval because \(10.5\le11.8\le13.0\). In this bin, these two observed quantiles are compatible with the simulated model behavior. This is not a hypothesis test proving the model correct, and it does not show that all times or subgroups are well predicted. The lower quantiles, other bins, and clinical consequences of possible discrepancies still need review.

A VPC is a diagnostic summary, not a substitute for checking data and prediction definitions. A systematic displacement of observed quantiles across time may indicate bias; a wider observed spread than the simulations may indicate underrepresented variability; and a mismatch limited to particular times may suggest a time-dependent problem or a design/data issue. The plot alone does not identify the cause. Simulation intervals also vary with sample size and binning, so apparent agreement in a small trial may be weak evidence.

Subgroup Summaries and a Decision for Intended Use

Overall agreement can conceal poor prediction in a clinically important subgroup. Prespecify relevant groups based on the intended use—for example, dose group, baseline renal-function category, or body-size range—and summarize bias and dispersion within each. Avoid searching many possible subgroups after seeing the data and presenting only the most favorable or unfavorable results. Small subgroup sizes make estimates imprecise, so report the number of patients and uncertainty, not just a point estimate.

A validation decision should be tied to a defined use and practical consequences. A model intended to describe average concentration profiles for a similar population may tolerate errors that would be unacceptable for individualized dosing near a safety threshold. Set decision criteria before reviewing validation results where possible; criteria might concern clinically relevant bias, predictive coverage, or subgroup performance. Passing a criterion supports the specified use under the evaluated conditions, not universal validity.

Worked Example: Checking Subgroup Bias Against a Prespecified Limit

Suppose a hypothetical validation plan specifies that the absolute mean patient-level prediction error should not exceed \(0.5\) mg/L in either of two clinically relevant groups. Each patient’s signed error is first averaged across that patient’s eligible samples, so the summaries below use patients—not individual samples—as the independent units. In group A, \(n=25\), the mean error is \(0.18\) mg/L, and the standard deviation of patient-level errors is \(0.60\) mg/L. In group B, \(n=16\), the corresponding values are \(1.05\) mg/L and \(0.80\) mg/L.

For group A, \(SE=s/\sqrt{n}=0.60/\sqrt{25}=0.12\) mg/L. Using a \(t\) interval with \(df=24\) and critical value \(2.064\), the approximate 95% interval is \(0.18\pm2.064(0.12)=0.18\pm0.2477\), or \([-0.0677,\,0.4277]\) mg/L. It is within the prespecified limits \([-0.5,\,0.5]\) mg/L.

For group B, \(SE=0.80/\sqrt{16}=0.20\) mg/L. With \(df=15\) and critical value \(2.131\), the interval is \(1.05\pm2.131(0.20)=1.05\pm0.4262\), or \([0.6238,\,1.4762]\) mg/L. The whole interval exceeds the upper limit of \(0.5\) mg/L. Under this illustrative criterion, group B shows evidence of clinically relevant underprediction, so an intended use that includes this group is not supported without further assessment. The group A result is reassuring against this bias limit, but does not by itself establish adequate variability or performance at every time.

Why the Error-Interval Calculation Works

Uncertainty around a mean prediction error can be summarized using a \(t\) interval when patient-level errors are independent observations from an approximately normal distribution, or when the sample is large enough for the mean to be approximately normal. Let \(e_i\) be the prespecified patient-level error, \(\overline e\) its sample mean, and \(s_e\) its sample standard deviation. The estimated standard error is \(s_e/\sqrt{n}\), where \(n\) is the number of independent patients. Under the normal sampling model, the standardized mean has a \(t\) distribution with \(n-1\) degrees of freedom. Therefore, a two-sided \(100(1-\alpha)\%\) interval is:

$$ \overline e \ \pm\ t_{1-\alpha/2,\,n-1}\frac{s_e}{\sqrt{n}}. $$

The interval describes uncertainty about the population mean error under those assumptions; it is not an interval expected to contain a fixed fraction of individual errors. If errors are markedly skewed, have influential outliers, or the number of patients is small, this interval may be unreliable. A patient-level bootstrap or another justified method may be preferable, provided the resampling unit preserves the dependence among repeated samples.

Diagnostics, Alternatives, and Limitations

A disciplined validation checks the data pipeline as well as the model. Inspect patient and visit matching, units, dose records, time origins, sampling times, covariates, and missingness. Compare observed concentrations with predictions over time and across prespecified groups, and investigate whether extreme errors are concentrated in a small number of patients. Confirm that simulation code uses the locked model and trial design. Reproducible records of model version, data transformations, simulation settings, and analysis code make the assessment auditable.

External validation differs from internal resampling, which repeatedly partitions or resamples the development data to estimate performance within that source of information. It also differs from calibration or updating, which changes model parameters or structure using new observations. External validation is a stronger test of transport to new data when the trial is genuinely independent, but results can still be specific to its population, protocol, assay, and dose range. A failed comparison should prompt investigation, not automatic refitting on the same validation data followed by a claim of independent validation.

Common limitations include limited sample size, sparse sampling at informative times, a narrow covariate range, and uncertainty in the reference observations. A model may reproduce central tendency but miss tail concentrations that matter for safety, or perform well overall while failing in a subgroup. A visually acceptable VPC and small average error do not guarantee good individual predictions. Conclusions should therefore combine prediction-error summaries, time-course diagnostics, subgroup results, data-quality checks, and the model’s intended decision context.

  • Do not confuse lack of detected bias with proof of accuracy. A small validation sample may be unable to reveal meaningful errors.
  • Do not average away opposite errors. A mean signed error near zero can coexist with large positive and negative errors; inspect MAE, RMSE, and plots as well.
  • Do not divide by a zero or near-zero prediction. Percentage errors require a nonzero prediction and can be unstable near zero; choose and justify another measure when needed.
  • Do not count repeated samples as independent patients. Account for within-patient dependence when quantifying uncertainty.
  • Do not tune on the validation set and keep calling it independent validation. Once results guide changes, assess the revised model with new independent data for an unbiased external evaluation.
Key takeaway: External validation is a structured comparison of locked-model predictions with independent observations under a defined trial design. Prediction errors, VPCs, and subgroup summaries provide complementary evidence; whether that evidence is adequate depends on prespecified criteria and the consequences of error for the intended use.

Check Your Understanding

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

  1. A measured concentration is \(7.0\) mg/L and its prediction is \(8.0\) mg/L. What is the signed error, and what does its sign mean?
  2. Why is a prediction of zero incompatible with the percentage prediction-error formula?
  3. In a VPC, an observed median falls outside its simulation interval in one time bin. What can you conclude, and what can you not conclude?
  4. Why should repeated concentration records from one patient not automatically be treated as independent observations when calculating uncertainty?
  5. A model performs acceptably overall but shows substantial underprediction in a prespecified subgroup included in its intended use. What should the validation conclusion address?

Solutions. (1) \(e=7.0-8.0=-1.0\) mg/L, so the model prediction exceeds the observation by \(1.0\) mg/L. (2) The formula divides by the prediction, so a zero denominator is undefined; near zero, the ratio can also become extremely large and unstable. Use a suitable alternative such as absolute error in mg/L. (3) The observed median is unusual relative to the model simulations for that bin and warrants investigation. One bin does not prove the model is wrong or identify the cause; check bin size, data alignment, other times, and the broader predictive diagnostics. (4) Repeated samples from the same patient are correlated, so treating them as independent can overstate the effective sample size and understate uncertainty. (5) State that overall performance does not establish suitability for every intended group; the subgroup-specific underprediction may make the intended use unsupported for that group, depending on prespecified criteria and clinical consequences.

Clinical Biostats