Tutorials › Population Pharmacokinetics › External Validation Across Sampling Designs

Bootstrap and External Validation · Tutorial 424 of 599

External Validation Across Sampling Designs

See why external performance estimates depend on the sampling design, and how to compare designs by defining a common target and accounting for repeated observations.

Advanced 12 min read

What You'll Learn

  • Explain how sampling times change the distribution over which external performance is averaged.
  • Distinguish patient-weighted summaries from sample-weighted summaries.
  • Standardize design-specific results to a shared schedule when the required sampling-time cells are observed.
  • Calculate the standard error of a stratified estimate under stated independence assumptions.
  • Diagnose when apparent performance differences may reflect sampling design rather than model behavior.
  • Recognize why repeated observations from a patient cannot be treated as independent for precision estimates.

Why Sampling Design Changes an External Estimate

Two external evaluations can apply the same locked population pharmacokinetic model to compatible datasets and still report different average predictive performance. One dataset may concentrate observations near peak concentration; another may contain mostly late samples. One may collect a few samples from many patients, while another collects many samples from each of fewer patients. These differences matter because an average over the observed records gives weight to the times and patients that the design samples most densely.

The key distinction is between a difference in model behavior and a difference in the evaluation distribution. A design-specific summary answers a question about the observations collected under that design. Comparing model behavior across studies usually requires a common target distribution—for example, a defined mix of early, middle, and late sampling occasions—and an uncertainty calculation that respects how observations were sampled.

Definition: A sampling design specifies which patients and sampling occasions contribute observations, and how frequently they are observed. A design-specific performance summary averages a prespecified observation-level score over the observations represented by that design. A standardized summary combines results across design strata using weights chosen to represent a stated target distribution, rather than the observed proportions in each dataset.

For illustration, let \(L_{ij}\) denote a prespecified score for patient \(i\) at sampling occasion \(j\), with larger values representing worse performance and units of mg/L. The examples use a mean of these scores only to show how design affects an average; the score itself is assumed to have been defined consistently before comparing datasets. The same weighting principles apply to other summaries, though their uncertainty calculations may differ.

Define the Target Before Comparing Summaries

A summary has meaning only in relation to the distribution it averages over. Suppose sampling occasions are grouped into prespecified time strata \(h=1,\ldots,H\). Let \(\mu_h\) be the mean score in stratum \(h\), and let \(w_h\) be the target weight for that stratum, where \(w_h\geq 0\) and \(\sum_h w_h=1\). The target-standardized mean is

$$ \mu_{\text{target}}=\sum_{h=1}^{H} w_h\mu_h. $$

The weights describe the target mix of occasions; they are not automatically the proportions observed in either external dataset. If the target is an equal mix of early and late occasions, the weights are \(0.5\) and \(0.5\), even if one dataset contains 80% early observations. Choosing weights is a scientific and design decision, not a calculation that can be settled from the observed data alone.

Another decision is whether the target unit is an observation or a patient. An observation-weighted mean gives more influence to patients with more recorded occasions. A patient-weighted mean first summarizes each patient's observations and then gives each patient equal weight. Neither is universally correct: they answer different questions. The intended target should be stated before interpreting the estimate.

Worked Example: Different Time Mix, Same Within-Time Results

Suppose two hypothetical external datasets have the same mean score in each of two sampling-time strata: 2.0 mg/L for early samples and 8.0 mg/L for late samples. Dataset A has 80% early and 20% late observations; Dataset B has 20% early and 80% late observations. Calculate each observed-mix mean, then standardize both to an equal early/late target.

Dataset A. Its observed-mix mean is

$$ 0.80(2.0)+0.20(8.0)=1.6+1.6=3.2\text{ mg/L}. $$

Dataset B. Its observed-mix mean is

$$ 0.20(2.0)+0.80(8.0)=0.4+6.4=6.8\text{ mg/L}. $$

The unstandardized difference is \(6.8-3.2=3.6\) mg/L. Yet the stratum-specific means are identical. Under an equal target mix, each standardized mean is

$$ 0.50(2.0)+0.50(8.0)=5.0\text{ mg/L}. $$

Thus the difference in observed-mix summaries is fully explained by the different proportions of early and late observations in this example. It is not evidence, by itself, that the model performs differently across the two datasets.

Density and the Unit Being Weighted

Different sampling densities create a related issue. If every recorded concentration contributes one row to a pooled average, a patient with ten samples contributes ten times as much as a patient with one sample. That may be appropriate when the target is a randomly selected recorded occasion under a specified schedule. It is not the same as asking about the average patient.

Worked Example: Observation-Weighted Versus Patient-Weighted

Consider four hypothetical patients. Their numbers of recorded occasions and within-patient mean scores are: Patient A, 1 occasion and 2 mg/L; Patient B, 1 and 4 mg/L; Patient C, 4 and 8 mg/L; Patient D, 4 and 6 mg/L. Calculate both the pooled observation-weighted mean and the equal-patient mean.

The observation-weighted mean uses each patient's number of occasions as a weight:

$$ \bar{L}_{\text{obs}} =\frac{1(2)+1(4)+4(8)+4(6)}{1+1+4+4} =\frac{62}{10} =6.2\text{ mg/L}. $$

The equal-patient mean gives each of the four patient means weight \(1/4\):

$$ \bar{L}_{\text{patient}} =\frac{2+4+8+6}{4} =\frac{20}{4} =5.0\text{ mg/L}. $$

The 1.2 mg/L difference is a consequence of weighting: the two patients with larger mean scores also contribute more occasions. It does not establish that one weighting scheme is intrinsically better. The appropriate summary depends on whether the target is a recorded occasion or an average patient.

Precision Under Stratified Sampling

Standardization changes the target weights, and its standard error must reflect those weights and the amount of information within each stratum. Under a simple stratified design, assume independent patients within and across strata, a prespecified target weight \(w_h\), and \(n_h\) independently sampled patients in stratum \(h\). Let \(s_h\) be the sample standard deviation of the patient-level scores in that stratum. The estimated standardized mean is \(\hat{\mu}_{\text{target}}=\sum_h w_h\bar{L}_h\). Its estimated variance is

$$ \widehat{\operatorname{Var}}(\hat{\mu}_{\text{target}}) =\sum_{h=1}^{H}w_h^2\frac{s_h^2}{n_h}, \qquad SE(\hat{\mu}_{\text{target}}) =\sqrt{\sum_{h=1}^{H}w_h^2\frac{s_h^2}{n_h}}. $$

The squared weights appear because variance scales with the square of a constant: for independent stratum means, the variance of their weighted sum is the sum of the squared weights times the individual variances. The formula also shows that precision depends on within-stratum variability and stratum sample sizes, not only on the total number of patients.

Worked Example: How Allocation Affects Standardized Precision

Suppose the target is an equal mix of early and late sampling occasions, so \(w_E=w_L=0.5\). Assume independent patient-level scores, with hypothetical stratum standard deviations \(s_E=2\) mg/L and \(s_L=6\) mg/L. Compare two designs with 40 patients: Design 1 samples 10 early and 30 late; Design 2 samples 20 early and 20 late.

For Design 1, the estimated variance is

$$ (0.5)^2\frac{2^2}{10}+(0.5)^2\frac{6^2}{30} =0.25(0.4)+0.25(1.2) =0.10+0.30 =0.40\;(\text{mg/L})^2. $$

Thus \(SE_1=\sqrt{0.40}=0.6325\) mg/L. For Design 2,

$$ (0.5)^2\frac{2^2}{20}+(0.5)^2\frac{6^2}{20} =0.25(0.2)+0.25(1.8) =0.05+0.45 =0.50\;(\text{mg/L})^2, $$

so \(SE_2=\sqrt{0.50}=0.7071\) mg/L. With this target and these stratum variances, Design 1 has the smaller estimated standard error because it allocates more patients to the more variable late stratum. This calculation assumes the stated variances and independence structure; it does not imply that an allocation can be chosen without regard to feasibility or the scientific target.

Repeated Samples and Dependence

When multiple occasions come from the same patient, they are generally not independent. A patient-level characteristic can make that patient's scores similar across occasions. Treating every record as an independent patient may therefore understate uncertainty, especially with many observations per patient. The preceding stratified formula applies directly when its independent units are patients. With repeated measurements, uncertainty must instead account for within-patient clustering, using an analysis or resampling scheme that preserves the patient as the sampling unit.

Sampling density can affect precision as well as weighting. Adding occasions to an already observed patient may improve knowledge about that patient's trajectory, but it does not provide the same independent information as adding another patient. A report should therefore describe both the number of patients and the distribution of observations per patient, rather than relying on the total record count alone.

Diagnostics, Alternatives, and Limitations

A useful comparison begins with a design table: list the time strata, the number of patients and observations in each, and the target weights. Then compare stratum-specific summaries before comparing overall estimates. If the stratum-specific results are similar but the raw overall means differ, a changed time mix is a plausible explanation. If they differ within strata, the overall design mix alone does not explain the discrepancy.

Three common approaches answer different questions:

ApproachWhat it summarizesMain caution
Observed-mix poolingPerformance averaged over the records collected in that datasetResults can change when the design's time or patient mix changes
Target standardizationPerformance averaged using a stated common set of stratum weightsRequires data to estimate the needed stratum means; sparse strata make estimates unstable
Design-matched comparisonResults compared within the same prespecified strata or scheduleMay give an incomplete overall summary and can be imprecise in small strata

Standardization is not a remedy for missing information. If a target assigns positive weight to a time stratum that one dataset does not observe, that dataset cannot provide the stratum mean from its own data. Reporting a standardized estimate in that situation requires additional assumptions or external information; it should not be presented as directly observed evidence. Even with all strata represented, small stratum sizes can make a weighted estimate imprecise.

Other failure signals include a large gap between sample-weighted and patient-weighted summaries, one patient contributing a substantial fraction of the records, highly unequal stratum sizes, and uncertainty estimates that change sharply when the patient rather than the record is treated as the resampling unit. These findings call for clarifying the target and the dependence structure, not simply adding decimal places to the result.

Common pitfall: “Dataset B has a larger pooled error, so the model must perform worse there.” This conclusion is not justified if Dataset B samples different times or gives more weight to patients with many observations. First compare the designs and stratum-specific results; then report either the design-specific target or a transparently weighted estimate for a common target.

A common target improves interpretability, but it does not make two studies identical. Standardized estimates can still differ because of sampling variability or genuine differences in the observed populations and data collection. This tutorial's calculations address how sampling time and density define and weight the evaluation summary; they do not by themselves identify the cause of a remaining difference.

Check Your Understanding

Answer each question, then compare with the brief solutions.

  1. Two datasets have identical early and late stratum means but different proportions of early samples. What should you inspect before interpreting a difference in their pooled means?
  2. A target assigns weights 0.25 to early and 0.75 to late occasions. The corresponding hypothetical means are 3 and 7 mg/L. Calculate the standardized mean.
  3. Why can an analysis that treats 100 repeated observations from 10 patients as 100 independent units overstate precision?
  4. One dataset has no observations in a stratum that receives positive target weight. Can its standardized estimate be calculated from observed stratum means alone?

Solutions. (1) Compare the early/late proportions and the stratum-specific means; the pooled difference may reflect the time mix. (2) \(0.25(3)+0.75(7)=0.75+5.25=6.0\) mg/L. (3) Repeated observations from a patient may be correlated, so the records do not provide 100 independent units of information. (4) No. The missing stratum mean is not observed in that dataset, so the weighted estimate needs additional assumptions or information.

Clinical Biostats