Tutorials › Bayesian Clinical Trials › Treatment-Effect Estimands Across Subgroups

Bayesian Estimands and Regulatory Interpretation · Tutorial 286 of 696

Treatment-Effect Estimands Across Subgroups

Define treatment effects within prespecified subgroups, standardize them to a target population, and interpret posterior summaries without mistaking subgroup estimates for proof of heterogeneity.

Advanced 12 min read

What You'll Learn

  • Define subgroup-specific treatment effects on an explicitly chosen scale.
  • Standardize subgroup effects using weights from a stated target population.
  • Calculate a posterior for a difference between subgroup effects.
  • Interpret posterior draws and summaries as evidence about heterogeneity.
  • Recognize how sparse data, model assumptions, and changing weights affect conclusions.
  • Compare separate subgroup estimates with interaction and hierarchical approaches.

Why Define Treatment Effects Across Subgroups?

An overall treatment effect can conceal differences among the people it averages over. A treatment may have a larger effect in one prespecified subgroup than another, or the effects may be similar despite different subgroup estimates. To distinguish these possibilities, define the subgroup effects and the target population before interpreting the results. The earlier material on marginal and conditional treatment-effect estimands established that effects depend on both the population being described and the scale on which they are measured; subgroup estimands make those choices explicit within population strata.

A subgroup is defined by a characteristic measured before randomization, such as baseline disease severity or age category. Prespecification matters: it makes the subgroup question part of the planned clinical interpretation rather than a category selected after seeing the results. The treatment strategy, outcome, time point, and intercurrent-event handling must remain clear within each subgroup, just as they do for an overall estimand.

Definition: Let \(S\) denote a prespecified baseline subgroup, with categories \(s=1,\ldots,K\), and let \(\theta_s\) be the treatment-effect estimand within category \(s\). A population-averaged treatment effect for a target population with subgroup weights \(w_s\) is \(\theta_{\mathrm{pop}}=\sum_{s=1}^{K}w_s\theta_s\), where \(w_s\geq 0\) and \(\sum_{s=1}^{K}w_s=1\). The subgroup contrast \(\theta_s-\theta_r\) compares the treatment effects in categories \(s\) and \(r\) on the stated effect scale.

The scale is part of the definition. For a binary outcome, a subgroup effect might be a risk difference, risk ratio, or odds ratio; these are not interchangeable, and a treatment effect can vary across subgroups on one scale but not another. For a continuous outcome, a difference in means is expressed in the outcome's units. A treatment-effect contrast must likewise be interpreted on the chosen scale. The formula for \(\theta_{\mathrm{pop}}\) applies directly when the subgroup-specific effects are defined on a scale that can be averaged as written, such as a risk-difference or mean-difference scale. A ratio-scale effect generally needs to be defined and standardized according to its own estimand, rather than obtained by averaging subgroup ratios without justification.

Target-Population Weights and Standardization

The weights are not a technical afterthought. They identify the population whose average effect is being described. They might be the proportions of subgroup categories in the randomized trial, proportions in an intended-use population, or another prespecified target distribution. If the weights change, the population-averaged effect can change even when every subgroup effect stays fixed.

For a mean-difference or risk-difference estimand, standardization follows from partitioning the target population into mutually exclusive, exhaustive categories. If \(Y^1\) and \(Y^0\) denote the outcomes under the two treatment strategies, the average treatment effect in that target population is:

$$ E(Y^1-Y^0) =\sum_{s=1}^{K}P(S=s)E(Y^1-Y^0\mid S=s) =\sum_{s=1}^{K}w_s\theta_s. $$

The second equality uses the law of total expectation and \(w_s=P(S=s)\) in the target population. It does not say that trial subgroup proportions automatically equal target-population weights. When they differ, the analyst must use the intended target weights and have data and modeling assumptions that support estimating the subgroup effects needed for standardization.

Worked Example: How Target Weights Change the Average

Consider a hypothetical trial with a binary response outcome. In a prespecified subgroup A, the response proportions are 24/40 under treatment and 20/40 under control. In subgroup B, they are 6/20 and 8/20, respectively. Define each subgroup effect as the treatment-minus-control risk difference.

For A, the estimated risk difference is \(24/40-20/40=0.60-0.50=0.10\), or 10 percentage points. For B, it is \(6/20-8/20=0.30-0.40=-0.10\), or minus 10 percentage points.

Suppose the target population is 80% subgroup A and 20% subgroup B. The standardized risk difference is \(0.80(0.10)+0.20(-0.10)=0.08-0.02=0.06\), or 6 percentage points. If the target weights were instead 50% and 50%, the standardized risk difference would be \(0.50(0.10)+0.50(-0.10)=0\). Neither calculation changes the subgroup effects; the two answers describe different target populations.

These are sample estimates, not posterior summaries. A causal interpretation also requires an appropriate trial design and valid outcome measurement; randomization within subgroups supports treatment comparisons, but it does not make every choice of target population automatically representative.

Posterior Distributions for Subgroup Effects

In a Bayesian analysis, the model produces a joint posterior distribution for the subgroup effects, conditional on the observed data and specified model and prior. A posterior summary of each \(\theta_s\) describes uncertainty about that subgroup effect. Applying the standardization formula to each joint posterior draw produces a posterior distribution for the population-averaged effect. Applying a contrast such as \(\theta_A-\theta_B\) to each draw produces a posterior distribution for heterogeneity on that scale.

The joint distribution matters. If subgroup effects are correlated in the posterior, their covariance contributes to uncertainty in a weighted average or contrast. For fixed weights, the posterior variance of a standardized effect is:

$$ \operatorname{Var}(\theta_{\mathrm{pop}}\mid D) =\sum_{s=1}^{K}w_s^2\operatorname{Var}(\theta_s\mid D) +2\sum_{s<r}w_sw_r\operatorname{Cov}(\theta_s,\theta_r\mid D). $$

This identity follows by expanding the variance of a weighted sum. It shows why combining separately reported subgroup intervals is not a valid way to obtain the interval for the overall effect. When weights are uncertain rather than fixed, their uncertainty and dependence on the effects must also be represented in the posterior calculation.

Worked Example: A Posterior Contrast for Binary Outcomes

Suppose, hypothetically, that independent binomial response data are observed in two prespecified subgroups. In A, 18 of 30 treated participants and 12 of 30 control participants respond. In B, the corresponding counts are 8 of 20 and 10 of 20. Use independent \(\operatorname{Beta}(1,1)\) priors for each treatment-by-subgroup response probability, and define each effect as a risk difference.

The binomial likelihood and beta prior give a beta posterior with success and failure counts added to the prior parameters. Thus, in A, the treatment probability has posterior \(\operatorname{Beta}(19,13)\), with mean \(19/32=0.59375\); the control probability has posterior \(\operatorname{Beta}(13,19)\), with mean \(13/32=0.40625\). The posterior mean risk difference in A is \(0.59375-0.40625=0.1875\).

In B, the treatment and control posteriors are \(\operatorname{Beta}(9,13)\) and \(\operatorname{Beta}(11,11)\). Their means are \(9/22=0.4091\) and \(11/22=0.5000\), giving a posterior mean risk difference of approximately \(-0.09091\). The posterior mean for the contrast \(\tau=\theta_A-\theta_B\) is therefore \(0.1875-(-0.09091)=0.2784\), or about 27.84 percentage points.

For a \(\operatorname{Beta}(a,b)\) distribution, the variance is \(ab/[(a+b)^2(a+b+1)]\). The variances for the two probabilities in A are each \(247/33792\), so the variance of their difference is \(2(247/33792)=0.01462\). In B, the variances are \(117/11132\) and \(121/11132\), so the variance of their difference is approximately \(0.02138\). Under the stipulated independence across all four cell probabilities, the contrast variance is \(0.01462+0.02138=0.03600\), with posterior standard deviation approximately \(0.1897\).

A rough normal moment approximation gives \(0.2784\pm1.96(0.1897)\), or approximately \((-0.0935,0.6503)\). This is an approximation, not an exact equal-tailed posterior credible interval: the exact posterior for a difference of beta-distributed probabilities is not generally normal. In an applied analysis, posterior draws can be subtracted directly to estimate the contrast's posterior quantiles and probabilities. The broad approximate interval also cautions against treating the positive posterior mean alone as decisive evidence that the subgroup effects differ.

Reading Heterogeneity From Posterior Draws

A posterior distribution for a contrast answers a more direct question about heterogeneity than separate subgroup summaries alone. For each posterior draw, calculate the contrast, then summarize its distribution using a posterior mean or median, credible interval, or posterior probability of a specified event. For example, \(P(\theta_A>\theta_B\mid D)\) is the posterior probability, under the model and prior, that the effect in A exceeds the effect in B on the defined scale. It is not a frequentist error rate, and it is not the probability that a model is true.

A difference from zero may not be the only clinically relevant description. Readers should consider the scale and magnitude of the contrast, uncertainty, and whether a difference would matter clinically. A posterior probability that one subgroup effect is larger does not by itself establish that the effects are meaningfully different. The clinical interpretation depends on what effect sizes matter and on how the estimand was defined.

Worked Example: Standardizing Posterior Draws

Suppose a hypothetical Bayesian model has been fit for a continuous outcome, measured in points. The target population is 60% subgroup A and 40% subgroup B. The table shows five illustrative joint posterior draws of the subgroup mean differences, in treatment-minus-control points. They are only a tiny excerpt from a much larger set of draws.

Draw\(\theta_A\)\(\theta_B\)\(0.6\theta_A+0.4\theta_B\)\(\theta_A-\theta_B\)
10.120.020.0800.10
20.08-0.040.0320.12
30.150.010.0940.14
4-0.020.060.012-0.08
50.10-0.030.0480.13

For draw 1, the standardized effect is \(0.6(0.12)+0.4(0.02)=0.080\) points, and the subgroup contrast is \(0.12-0.02=0.10\) points. The same calculations are performed for every draw. Posterior summaries of the standardized column describe the target-population effect; summaries of the contrast column describe subgroup differences. Five displayed draws are not enough to estimate reliable posterior quantiles or probabilities, and the fraction of positive contrasts in this excerpt should not be reported as a precise posterior probability.

Model Choices, Diagnostics, and Limitations

Several analyses can address subgroup patterns, but they answer related questions with different assumptions. Separate subgroup analyses are easy to inspect and make subgroup-specific results visible. However, they may be imprecise when a subgroup has few participants or events, and separate estimates do not automatically give a valid standardized posterior or posterior for a between-subgroup contrast. A regression model with treatment-by-subgroup terms estimates differences in effects directly, conditional on its model specification. A hierarchical model can partially pool subgroup effects, often stabilizing estimates when information is sparse, but its pooling assumptions influence the posterior heterogeneity. No approach eliminates the need to state the estimand, scale, and target weights.

Check that the subgroup categories are mutually exclusive and cover the target population, that definitions were prespecified, and that treatment comparisons are supported by adequate data in each category. Inspect model convergence and, where appropriate, posterior predictive behavior; check that the coding of treatment, subgroup, outcome, and effect scale matches the estimand. Sparse outcomes may leave subgroup posteriors strongly influenced by the prior. Compare reasonable prior specifications and examine whether the substantive interpretation is stable. If subgroup membership was selected after inspecting outcomes, its posterior summaries do not undo the exploratory selection.

A further limitation is transportability: subgroup effects estimated in a trial do not necessarily apply to another population without suitable assumptions and data. Standardizing with new weights changes the target population, but does not ensure that trial estimates remain valid for its subgroups. Posterior uncertainty quantifies uncertainty conditional on the model and data; it does not automatically cover model misspecification, an ill-chosen subgroup definition, or unsupported extrapolation.

Common mistake: “The treatment effect is statistically significant in subgroup A but not subgroup B, so the treatment effects differ.” This does not follow: significance in one subgroup and not the other is not a test or posterior summary of their difference. Calculate and interpret the posterior distribution of \(\theta_A-\theta_B\) directly, on the prespecified scale.

Check Your Understanding

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

  1. Subgroup effects on a risk-difference scale are 0.12 in A and \(-0.04\) in B. What is the standardized effect for target weights 70% A and 30% B?
  2. Why does an interval for each subgroup effect not, by itself, provide an interval for the contrast between those effects?
  3. What does \(P(\theta_A>\theta_B\mid D)\) describe, and what is one thing it does not describe?
  4. If the subgroup effects remain unchanged but target weights change from 80% A and 20% B to equal weights, what changes in the estimand?

Solutions. 1. The standardized effect is \(0.70(0.12)+0.30(-0.04)=0.084-0.012=0.072\), or 7.2 percentage points. 2. The contrast's uncertainty depends on the joint posterior, including any covariance between subgroup effects; separate intervals do not encode that information. 3. It is the posterior probability, conditional on the model, prior, and data, that the effect in A exceeds the effect in B on the stated scale. It is not the probability that the model is true. 4. The target population changes, so the population-averaged estimand changes to the equally weighted average, even though the subgroup-specific effects do not.

Clinical Biostats