Tutorials › Nonlinear Mixed-Effects Models (NLME) › Assessing Covariate Support and Transportability

External Validation and Model Averaging · Tutorial 668 of 797

Assessing Covariate Support and Transportability

You will learn to assess covariate overlap and use subgroup scores to identify where external prediction may be less reliable.

Advanced 12 min read

What You'll Learn

  • Define covariate support and overlap for development and external populations
  • Check marginal ranges, joint combinations, and categorical strata
  • Interpret standardized differences and density-ratio weights cautiously
  • Relate covariate overlap to assumptions required for transport
  • Compare subgroup prediction scores without mistaking them for causal evidence
  • Identify practical diagnostics and limits of support assessments

Why Covariate Support Matters

An external prediction can be evaluated against observed concentrations, but an overall score alone may conceal where the model is being asked to extrapolate. A model developed mainly in adults with moderate renal function, for example, may be evaluated in an external sample containing many subjects with severe impairment. Poor performance in that group could matter clinically even if the overall score looks acceptable. Conversely, a different mix of otherwise well-supported subjects can change an aggregate score without indicating that the model's conditional predictions have changed.

Support assessment asks whether external subjects have covariate profiles resembling profiles represented in the development population. It is a diagnostic for the scope of the prediction claim, not a guarantee that predictions will transport. Similar covariate distributions do not establish that the concentration model, dosing, measurement process, or residual variability is the same in both populations.

Definition: Let \(X\) denote the vector of measured covariates used by an NLME prediction model. The development support is the set of covariate values or combinations represented with adequate data in the development population. Covariate overlap describes how much the external population's covariate distribution lies within that represented region. In finite samples, support is assessed empirically; a range observed in the data is not proof that every point inside it is adequately represented.

Assessing Marginal and Joint Support

Begin by specifying which covariates define the prediction context: for example, age, body size, renal function, genotype, or dosing-related covariates. Use the subject as the basic unit for subject-level covariates. Repeated concentration records from one person do not create additional independent subjects with new ages or genotypes. If the external prediction target also depends on sampling times or dosing histories, inspect those design features separately rather than treating them as interchangeable with subject covariates.

For each continuous covariate, compare distributions using plots and summaries such as ranges, quantiles, and means. For categorical covariates, compare category proportions and identify absent or very small strata. Then inspect joint combinations. A subject can lie inside the observed age range and inside the observed renal-function range while having an age–renal-function combination scarcely present in development data. Marginal checks alone will miss that problem.

Worked Example: A Marginal Range Is Not Joint Support

Suppose a hypothetical development data set includes 240 subjects. Age ranges from 18 to 70 years, and estimated renal function ranges from 25 to 130 mL/min. An external data set contains 60 subjects, including one aged 74 years with renal function of 82 mL/min and another aged 68 years with renal function of 28 mL/min.

The first subject is outside the observed development age range: \(74>70\). That is a clear marginal extrapolation flag, although it does not by itself say how inaccurate the prediction will be. The second subject lies inside both marginal ranges: \(18\leq68\leq70\) and \(25\leq28\leq130\). Marginal checks therefore do not flag this profile.

Suppose, however, that only 2 of the 240 development subjects were both older than 65 years and below 35 mL/min renal function. The joint region containing the second subject is weakly represented. It should be reported as sparse support, not as well supported merely because each value separately falls within a range. Useful follow-up checks include a two-dimensional plot, counts in clinically meaningful strata, and a multivariable distance or density diagnostic.

This example checks covariate representation only. It cannot establish whether the external model predictions are accurate; that requires comparing predictions with external outcomes as well.

A standardized mean difference can summarize marginal imbalance for a continuous covariate. For development and external means \(\bar{x}_D\) and \(\bar{x}_E\), and standard deviations \(s_D\) and \(s_E\), one common version is

$$ \mathrm{SMD}=\frac{\bar{x}_E-\bar{x}_D}{\sqrt{(s_D^2+s_E^2)/2}}. $$

The sign indicates direction; the magnitude is in pooled standard-deviation units. For a binary covariate, a difference in proportions is often reported, with a chosen standardization stated explicitly. SMDs are descriptive, not hypothesis tests. No universal cutoff proves adequate overlap, and a small SMD can coexist with poor joint support or extreme tails.

From Overlap to Transportability

A useful way to clarify why overlap matters is to express prediction performance as a target-population average. Let \(D\) denote development and \(E\) the external target. Let \(Y\) be an external concentration outcome, and let \(L(Y,\widehat{F};X)\) be a specified prediction loss for the model's predictive distribution \(\widehat{F}\) at covariates \(X\). The target risk is the expected loss among external subjects.

$$ R_E=\int \mathbb{E}\!\left[L(Y,\widehat{F};x)\mid X=x,E\right] f_E(x)\,dx. $$

If, conditional on the measured covariates, the outcome and prediction-loss relationship is stable between development and external populations, then the conditional expectation of loss can be shared across populations. If also \(f_E(x)=0\) wherever \(f_D(x)=0\), the target risk can be written using development covariate density:

$$ R_E=\int \mathbb{E}\!\left[L(Y,\widehat{F};x)\mid X=x,D\right] \frac{f_E(x)}{f_D(x)}f_D(x)\,dx. $$

The ratio \(f_E(x)/f_D(x)\) is a density ratio: regions common in the external target but uncommon in development receive greater weight. This identity explains why lack of overlap is consequential. If the external population has covariate values with no development representation, the ratio is undefined there, and development data cannot identify the corresponding conditional loss without additional assumptions or data. Even with formal overlap, very large ratios make estimates unstable.

The argument depends on more than matching covariate distributions. It assumes that the measured covariates capture relevant differences in conditional prediction performance, that the conditional outcome relationship is stable, and that the covariate densities are meaningfully estimated. Changes in assay, dosing practice, outcome handling, or unmeasured effect modifiers can violate transportability despite good measured-covariate overlap.

Worked Example: Reweighting Two Covariate Strata

Consider two hypothetical renal-function strata: moderate impairment and severe impairment. In development, their proportions are 0.80 and 0.20; in the external target they are 0.50 and 0.50. Suppose the average prediction losses within the two strata are 1 and 4 squared concentration units, respectively. Assume for this calculation that these conditional losses are stable across populations.

The development average loss is \(0.80(1)+0.20(4)=0.80+0.80=1.60\) squared concentration units. It does not represent the external covariate mix.

The external-to-development density ratios for the strata are \(0.50/0.80=0.625\) and \(0.50/0.20=2.50\). The target average loss is \(0.50(1)+0.50(4)=0.50+2.00=2.50\) squared concentration units.

Equivalently, weighting development contributions by the ratios gives \(0.80(0.625)(1)+0.20(2.50)(4)=0.50+2.00=2.50\). The larger weight for severe impairment reflects that this stratum is more common externally than in development. This calculation does not validate the stability assumption; it shows how a changed covariate mix can change expected performance even when stratum-specific loss is assumed unchanged.

Subgroup-Specific Prediction Scores

After covariate support has been described, report external prediction scores for clinically relevant subgroups when sample sizes permit. Use a score defined for the predictive target and give its units or scale. For example, subgroup root mean squared error (RMSE) for concentration predictions is

$$ \mathrm{RMSE}_g=\sqrt{\frac{1}{n_g}\sum_{i\in g}(y_i-\widehat{y}_i)^2}, $$

where \(g\) denotes a subgroup, \(n_g\) is its number of external subjects or observations as defined for the prediction task, \(y_i\) is observed concentration, and \(\widehat{y}_i\) is the corresponding prediction. State whether the score is calculated over subjects, samples, or a prespecified prediction horizon. When subjects contribute repeated samples, uncertainty calculations and summaries should respect that clustering; treating every sample as an independent subject can give misleading precision.

Worked Example: Comparing Subgroup Prediction Scores

Suppose a hypothetical external validation has four subjects in each of two prespecified renal-function groups. For a descriptive scale-free comparison, calculate the root mean squared standardized prediction error, using \(z_i=(y_i-\widehat{y}_i)/s_i\), where \(s_i\) is the model's predictive standard deviation for that prediction.

In group A, the four standardized errors are \(0.2,-0.4,0.6,-0.2\). The score is \(\sqrt{(0.2^2+(-0.4)^2+0.6^2+(-0.2)^2)/4} =\sqrt{(0.04+0.16+0.36+0.04)/4} =\sqrt{0.15}=0.3873\).

In group B, the errors are \(1.2,-1.8,2.1,-1.5\). The score is \(\sqrt{(1.44+3.24+4.41+2.25)/4} =\sqrt{2.835}=1.684\). Thus the standardized errors are larger in group B in this small hypothetical sample. This is a signal to inspect predictions and support in that subgroup, not proof of a population-level difference. With only four subjects per group, individual observations have substantial influence.

A standardized-error score discards some information about error direction and does not replace assessment of calibration or predictive-interval performance. Report the raw concentration score too when clinical interpretation depends on concentration units.

Diagnostics, Alternatives, and Limitations

A defensible support assessment uses complementary summaries rather than a single pass/fail statistic. Common options include:

  • Ranges and distribution plots: reveal obvious tail extrapolation and shifts, but do not characterize multivariable combinations.
  • Stratified counts and plots: show whether important clinical groups or covariate combinations are sparse; results depend on how strata are defined.
  • Standardized differences: summarize marginal imbalance compactly, but can conceal tail and joint-distribution differences.
  • Multivariable distances or density ratios: can capture joint rarity, but depend on scaling, model specification, and the amount of data. Extreme estimated weights signal weak overlap and unstable reweighting.
  • Domain classification: a model that distinguishes development from external subjects can reveal distributional differences. Strong discrimination is a warning, while weak discrimination does not prove overlap, especially with limited samples or an inadequate classifier.

Diagnostics should be interpreted with the prediction target in view. A covariate may be imbalanced but irrelevant to the model's conditional prediction, while a small imbalance in a strong effect modifier may be consequential. If support is weak, report which subjects or subgroups are affected, how many are involved, and what part of the target population is not well represented. Do not silently remove difficult subjects and then describe the narrower result as validation for the original target.

Support checks and subgroup scores answer related but distinct questions. Covariate checks identify where external subjects differ from development; subgroup scores show how predictions performed in observed external outcomes. Poor subgroup performance where support is sparse is consistent with an extrapolation problem, but it does not prove that sparsity caused the errors. Differences in outcome measurement, treatment, or other factors may also matter. Conversely, good scores in a small subgroup do not establish reliable performance throughout a sparsely represented region.

A common mistake is to say, “Every external covariate is within the development minimum and maximum, so the model is supported.” This reasoning checks only separate marginal ranges. It ignores joint combinations, sparse tails, and categorical strata, and it treats observed extremes as if they were densely represented. The correction is to combine marginal and joint diagnostics, state where support is weak, and interpret external prediction scores in those regions with appropriate caution.

Key takeaway: Covariate overlap is a condition for learning about external performance from development data, not a guarantee of transportability. Assess joint representation, report subgroup scores with their sample sizes and scales, and distinguish evidence about covariate support from evidence about prediction accuracy.

Check Your Understanding

Answer each question using the definitions and calculations above.

  1. Development ages range from 20 to 65 years and external ages from 30 to 70 years. What does the range comparison indicate, and what does it not establish?
  2. Development has 90% moderate and 10% severe impairment; the external target has 60% and 40%, respectively. If the subgroup losses are 2 and 5 squared concentration units and are stable across populations, calculate both the development and external average loss.
  3. Why can separate marginal range checks miss a support problem?
  4. What does a subgroup score of 1.7 standardized-error units establish when the subgroup contains only four subjects?

Solutions. (1) External values above 65 years are outside the observed development range, flagging marginal extrapolation. The comparison does not determine prediction accuracy or rule out other support problems. (2) Development average: \(0.90(2)+0.10(5)=1.80+0.50=2.30\). External average: \(0.60(2)+0.40(5)=1.20+2.00=3.20\) squared concentration units. (3) A covariate combination can be rare or absent even when each value lies within its own marginal range. (4) It describes the observed subgroup score; it does not establish a stable population-level performance difference, particularly with only four subjects and potentially influential observations.