Why Subgroup Performance Needs Separate Attention
An external model can perform acceptably on average while making systematically different predictions for clinically important groups. For example, prediction errors could be centered near zero in one renal-function category and consistently positive in another. A pooled summary can hide that pattern, particularly when the groups have very different sample sizes. The reverse problem also occurs: a noisy estimate in a small group can look different by chance even when the underlying performance is similar.
Subgroup evaluation therefore asks two questions at once: how do prediction errors differ across groups, and how certain are we about those differences? The distinction matters in population pharmacokinetics (PK), where repeated observations from one participant are not independent observations, and where an external validation sample may include unequal numbers of participants from clinically relevant categories.
The outcome and prediction must refer to the same quantity, unit, time point, and prediction target. For a concentration outcome, for example, errors might be reported in mg/L. If the evaluation uses log-scale errors or a different error definition, that choice should be stated: bias and precision depend on the scale. Population predictions and conditional predictions answer different questions, so a subgroup comparison must use the same prediction type in every subgroup.
Define clinical subgroups before examining their errors whenever possible. A subgroup should be interpretable and determined from information available for the intended evaluation, rather than selected because it displays an unusual result. The validation model remains locked: these comparisons evaluate its predictions and do not re-estimate its parameters.
Estimating Bias and Precision Within Groups
For a subgroup containing \(n_g\) independent participants, let its errors be \(e_{1g}, \ldots, e_{n_g g}\). The estimated bias is the subgroup mean error. A common summary of precision is the sample standard deviation of errors; a second useful summary is the root mean squared error (RMSE). Standard deviation describes scatter around the subgroup mean, while RMSE measures typical error relative to zero and therefore reflects both scatter and bias.
A lower \(s_g\) means less observed spread around that subgroup’s average error. A lower RMSE means smaller errors relative to perfect prediction, which requires errors to be both centered near zero and not too dispersed. Neither quantity alone establishes that differences between groups are real. Uncertainty in the estimated bias or precision is a separate issue, and is especially important when \(n_g\) is small.
Worked Example: Separating Bias From Precision
Suppose a hypothetical external PK validation dataset has four independent participants in each of two subgroups. Their prediction errors, in mg/L, are \(-2, 0, 1, 1\) in Group A and \(2, 3, 3, 4\) in Group B. Calculate the bias, sample standard deviation, and RMSE for each group.
Group A bias: \(\bar{e}_A=(-2+0+1+1)/4=0\) mg/L. Its squared deviations from the mean sum to \(4+0+1+1=6\), so \(s_A=\sqrt{6/(4-1)}=\sqrt{2}=1.414\) mg/L. The squared errors also sum to 6, giving \(\mathrm{RMSE}_A=\sqrt{6/4}=\sqrt{1.5}=1.225\) mg/L.
Group B bias: \(\bar{e}_B=(2+3+3+4)/4=3\) mg/L. Its squared deviations from the mean sum to \(1+0+0+1=2\), so \(s_B=\sqrt{2/3}=0.8165\) mg/L. The squared errors sum to \(4+9+9+16=38\), giving \(\mathrm{RMSE}_B=\sqrt{38/4}=\sqrt{9.5}=3.082\) mg/L.
Group B has lower scatter around its own mean, but its positive bias is much larger. Consequently, it has the larger RMSE. Describing Group B as “more precise” based only on \(s_B\) would omit its substantial systematic underprediction.
Why RMSE Combines Bias and Scatter
The relationship between RMSE, bias, and precision makes clear why these summaries should not be treated as interchangeable. Let the observed subgroup errors be fixed and define their variance using divisor \(n_g\), rather than the \(n_g-1\) divisor used in the sample standard deviation. The mean squared error can be expanded by writing each error as its deviation from the sample mean plus the sample mean itself.
The cross-product term is zero because the deviations from the sample mean sum to zero. Since \(\sum_i(e_{ig}-\bar{e}_g)^2=(n_g-1)s_g^2\), taking square roots gives \(\mathrm{RMSE}_g=\sqrt{\bar{e}_g^2+((n_g-1)/n_g)s_g^2}\). The factor \((n_g-1)/n_g\) appears because the sample standard deviation uses divisor \(n_g-1\), whereas RMSE uses divisor \(n_g\). This identity applies to the observed sample summaries; it does not imply that the sample estimates equal population quantities.
Unequal Subgroup Sizes and the Overall Summary
The pooled mean error weights each participant equally, so larger subgroups contribute more. It is not generally the same as the unweighted average of subgroup means. Neither summary is inherently wrong: they answer different questions. The pooled summary describes the validation sample’s participant mix. An equally weighted subgroup summary gives each defined group the same influence. If a target population has specified subgroup proportions, a weighted summary using those proportions may be more relevant, provided the subgroup estimates are suitable for that target.
Worked Example: How Unequal Sampling Changes Pooled Bias
Consider hypothetical validation data with 90 participants in Group A and 10 in Group B. Suppose their mean errors are \(0.2\) mg/L and \(2.0\) mg/L, respectively. Calculate the pooled mean error and compare it with an equally weighted average of the two subgroup means.
The pooled mean error weights the group means by their sample sizes: \[ \bar{e}_{\mathrm{pooled}}=\frac{90(0.2)+10(2.0)}{90+10} =\frac{18+20}{100}=0.38\ \mathrm{mg/L}. \] The equally weighted average is \((0.2+2.0)/2=1.10\) mg/L. These differ because the validation sample contains nine times as many participants in Group A.
If the intended target assigns equal weight to the two groups, \(1.10\) mg/L is the corresponding weighted average of these subgroup estimates; \(0.38\) mg/L instead describes the observed sample mix. The choice of summary must follow the question and target, not whichever number looks more favorable. Weighting does not remove uncertainty in either subgroup estimate.
Quantifying Uncertainty and Reading Sparse Groups
A visible difference in point estimates is not sufficient evidence of a genuine subgroup difference. Estimate uncertainty for each subgroup and, preferably, for the contrast itself. For two independent groups, a simple contrast in bias is \(\bar{e}_B-\bar{e}_A\). Its standard error can be estimated using the two sample variances and sample sizes. This approach assumes independent participants across groups; if subgroup membership overlaps or observations are paired, the dependence must be reflected in the contrast’s uncertainty calculation.
Worked Example: A Bias Difference With a Sparse Subgroup
In a hypothetical validation, Group A has \(n_A=25\), mean error \(0.4\) mg/L, and sample standard deviation \(1.0\) mg/L. Group B has \(n_B=4\), mean error \(1.5\) mg/L, and sample standard deviation \(2.0\) mg/L. Under independent sampling and approximately normal errors within each group, calculate a Welch interval for the difference in mean errors, Group B minus Group A.
The estimated difference is \(1.5-0.4=1.10\) mg/L. Its estimated standard error is \[ SE=\sqrt{\frac{2.0^2}{4}+\frac{1.0^2}{25}} =\sqrt{1+0.04}=\sqrt{1.04}=1.020\ \mathrm{mg/L}. \] The Welch-Satterthwaite degrees of freedom are \[ df=\frac{(1+0.04)^2}{1^2/(4-1)+0.04^2/(25-1)} =\frac{1.0816}{0.3333+0.0000667}\approx3.244. \] Using a two-sided 95% \(t\) interval with approximately \(3.244\) degrees of freedom, \(t^*\) is about \(3.051\). The interval is \(1.10\pm3.051(1.020)=1.10\pm3.112\), or approximately \([-2.01,\ 4.21]\) mg/L.
The interval includes zero and is wide. These data do not establish a difference in mean error, but they also do not establish that the subgroup biases are equal. With only four participants in Group B, its mean and variability are estimated imprecisely; the normal-error assumption is also difficult to assess. A large point difference should prompt careful investigation, not a confident claim of subgroup-specific model failure.
For many PK validation datasets, a subject-level bootstrap is a useful way to estimate uncertainty in subgroup metrics and their contrasts without relying solely on a normal approximation for the metric. The resampling unit should be the independent participant: if a participant contributes multiple concentrations or occasions, resample that participant and retain all their records together. Resampling individual concentration records would incorrectly treat within-participant observations as independent and can understate uncertainty.
The bootstrap scheme should match the estimand. Resampling participants within each subgroup keeps subgroup sample sizes fixed and estimates uncertainty conditional on those subgroup sizes. Resampling participants from the full validation sample reflects the observed mixture and permits subgroup counts to vary across replicates. In either case, recompute the same bias, precision, or subgroup contrast in each replicate. A bootstrap interval cannot compensate for a subgroup with very few independent participants: resamples repeatedly reuse the same limited information. Inspect the bootstrap distribution for instability, skewness, or degenerate replicates, and interpret it with that limitation in view.
Comparisons, Diagnostics, and Limits
Direct subgroup summaries are transparent and show performance in the units clinicians recognize. A regression model with subgroup indicators and interactions can estimate contrasts and adjust for prespecified factors, but its interpretation depends on the model form and assumptions; it can also obscure a small subgroup’s sparse information. A pooled overall metric is simpler, but cannot answer whether one subgroup has a different bias or error spread. These approaches are complementary, not substitutes for defining the target comparison clearly.
Before interpreting an apparent difference, check whether the pattern is stable and whether the comparison is fair. Look at subgroup sample sizes, participant-level error plots, outliers, and the spread of errors—not just the means. Check that outcomes, prediction types, units, and evaluation times are comparable across groups. A subgroup’s precision estimate can be distorted by a single extreme error, especially at small \(n_g\). Consider whether differences in sampling frequency or the number of records per participant could give some participants disproportionate influence; use participant-level summaries or an analysis that explicitly respects the repeated-measures structure when appropriate.
Also distinguish subgroup-specific performance from the uncertainty of the subgroup estimate. A wide confidence interval reflects limited information about the metric; it does not itself show that predictions are imprecise for each individual. Conversely, a narrow interval for mean bias says little about the spread of individual errors. Report both point estimates and uncertainty, with units and subgroup sample sizes. If many subgroups or metrics are examined, some striking contrasts can arise by chance; prioritize clinically motivated comparisons and treat exploratory findings as such.
Subgroup comparisons describe performance in the groups and validation data actually evaluated. They cannot, by themselves, establish performance in groups with little information or justify extrapolation beyond the observed data. They are also not causal comparisons: a difference in errors does not show that subgroup membership caused the model’s performance pattern. Interpret the results as evidence about predictive behavior, with the scope limited by the validation design and available observations.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions below.
- A subgroup has mean error \(-1.2\) mg/L. With the stated error convention, are predictions tending to be too high or too low?
- Why can the pooled mean error differ from the equally weighted average of subgroup mean errors?
- Why should repeated concentration records from one participant remain together in a subject-level bootstrap?
- A small subgroup has a larger estimated bias, but the confidence interval for the difference includes zero and is wide. What is the appropriate conclusion?
Solutions. (1) Negative observed-minus-predicted error means predictions tend to be too high. (2) The pooled mean weights each participant equally, so groups contribute in proportion to their sample sizes; the equally weighted average gives each group the same weight. (3) Records from the same participant are dependent; resampling them separately breaks that dependence and can understate uncertainty. (4) The observed estimates differ, but the data do not establish a subgroup difference; the wide interval also does not establish equality, and sparse data may be limiting precision.