Tutorials › Causal Inference › Partial Pooling for Multiple Subgroup Effects

Effect Modification and Subgroup Effects · Tutorial 870 of 972

Partial Pooling for Multiple Subgroup Effects

See how partial pooling stabilizes subgroup treatment effects, how to calculate the shrinkage, and what the model does—and does not—assume about similarities between groups.

Advanced 10 min read

What You'll Learn

  • Define a hierarchical model for subgroup-specific treatment-effect estimates
  • Derive the posterior mean and variance under a normal model
  • Calculate how subgroup precision and between-subgroup variation govern shrinkage
  • Interpret partially pooled effects without treating them as identical
  • Identify causal and statistical assumptions required for useful pooling
  • Recognize when partial pooling cannot repair bias or poor model choices

Why Pool Subgroup Effects?

A subgroup analysis may produce several treatment-effect estimates, one for each age band, disease stage, or other prespecified group. Estimates based on small subgroups can be highly variable: a few outcomes may move an estimate substantially, and in some models sparse data can cause separation or unstable estimates. Treating every estimate as entirely independent leaves that instability untouched. Treating all subgroups as having exactly the same effect, however, can erase genuine effect modification.

Partial pooling offers an intermediate approach. It models subgroup effects as related, but not identical. An estimate with little information is pulled more toward the distributional center of the subgroup effects than an estimate with high precision. The result can be more stable than separate estimates while still allowing treatment effects to differ across groups.

Definition: Partial pooling is a modeling strategy in which subgroup-specific effects are estimated separately but linked through a shared probability distribution or hierarchical structure. The model allows subgroup effects to differ, while using information across subgroups to stabilize their estimates.

A Normal Hierarchical Model

Let \(\theta_j\) be the causal treatment effect for subgroup \(j\), defined on a particular effect scale and for a stated target population. Let \(y_j\) be an estimate of that effect, and let \(s_j\) be its standard error. A simple normal hierarchical model is:

$$ y_j \mid \theta_j \sim N(\theta_j,s_j^2), \qquad \theta_j \mid \mu_\theta,\tau \sim N(\mu_\theta,\tau^2). $$

The first distribution describes sampling uncertainty: if the subgroup effect were \(\theta_j\), its estimated value \(y_j\) would vary with standard error \(s_j\). The second describes variation in the underlying effects across subgroups. Here, \(\mu_\theta\) is the center of the subgroup-effect distribution, and \(\tau\) is the between-subgroup standard deviation. A small \(\tau\) says that effects tend to be close to the center; it does not assert that they are exactly equal.

This model is often used as a normal approximation to the subgroup estimates and their sampling distributions. For a binary outcome, for example, an analyst might estimate effects on the risk-difference scale and use this approximation when it is reasonable. A hierarchical model can instead be specified directly for outcome data, perhaps on a log-odds or log-rate scale. In that case, the modeled effects and their interpretation are on that scale unless effects are subsequently transformed or standardized.

The hierarchy assumes that the subgroup effects are exchangeable conditional on the model: before seeing the subgroup-specific data, the model treats their labels symmetrically and describes their effects using a common distribution. This is a modeling assumption, not a claim that the groups are identical or interchangeable in every respect. Subgroups with known, systematic differences may call for a model that includes those differences rather than one common center alone.

How Much Shrinkage?

If \(\mu_\theta\) and \(\tau\) are treated as known, the normal model gives a direct expression for the subgroup effect’s posterior distribution. Its mean is a weighted average of the subgroup estimate and the common center:

$$ E(\theta_j \mid y_j,\mu_\theta,\tau) = \lambda_j y_j+(1-\lambda_j)\mu_\theta, \qquad \lambda_j=\frac{\tau^2}{\tau^2+s_j^2}. $$

The factor \(\lambda_j\) determines how much weight the subgroup estimate receives. If \(s_j\) is small relative to \(\tau\), the estimate is precise compared with the expected variation across groups, and \(\lambda_j\) is near 1. The fitted effect then stays close to \(y_j\). If \(s_j\) is large relative to \(\tau\), the subgroup estimate is noisy relative to the modeled between-subgroup variation, and \(\lambda_j\) is smaller. The fitted effect is pulled more toward \(\mu_\theta\).

The corresponding conditional posterior variance is:

$$ \operatorname{Var}(\theta_j \mid y_j,\mu_\theta,\tau) = \frac{s_j^2\tau^2}{s_j^2+\tau^2}. $$

The variance reflects uncertainty about the subgroup effect under the model, conditional on the stated values of \(\mu_\theta\) and \(\tau\). In an actual analysis those quantities are usually unknown and must be estimated or assigned probability distributions. Their uncertainty should then be accounted for in the resulting inference; simply inserting estimated values into these formulas can understate uncertainty, especially when there are few subgroups.

Why the Formula Gives a Weighted Average

The shrinkage expression follows by combining two normal distributions: the sampling model for \(y_j\) and the distribution for \(\theta_j\). As a short derivation, the conditional density for \(\theta_j\) is proportional to the likelihood times the subgroup-effect distribution. Keeping only the terms involving \(\theta_j\), its exponent is:

$$ -\frac{(y_j-\theta_j)^2}{2s_j^2} -\frac{(\theta_j-\mu_\theta)^2}{2\tau^2}. $$

Collecting the quadratic and linear terms in \(\theta_j\) gives a normal distribution with precision \(1/s_j^2+1/\tau^2\). Its variance is the reciprocal of that precision, and its mean is:

$$ \frac{y_j/s_j^2+\mu_\theta/\tau^2}{1/s_j^2+1/\tau^2} = \frac{\tau^2}{s_j^2+\tau^2}y_j + \frac{s_j^2}{s_j^2+\tau^2}\mu_\theta. $$

The data contribute more weight when their precision \(1/s_j^2\) is high; the hierarchical distribution contributes more weight when its precision \(1/\tau^2\) is high. This explains why low-information subgroups are shrunk more strongly.

Worked Example: Shrinking a Noisy Risk-Difference Estimate

Suppose a hypothetical randomized trial reports subgroup risk differences in percentage points, with negative values favoring treatment. For one subgroup, the estimated effect is \(y_j=-12\) percentage points with standard error \(s_j=8\) percentage points. Suppose, for illustration, that the hierarchical model’s center is \(\mu_\theta=-5\) percentage points and its between-subgroup standard deviation is \(\tau=4\) percentage points. Assume the estimate is approximately normal and the trial supports a causal interpretation of the subgroup effect.

The shrinkage weight on the subgroup estimate is:

$$ \lambda_j = \frac{4^2}{4^2+8^2} = \frac{16}{80} = 0.200. $$

Thus, the fitted subgroup effect is:

$$ 0.200(-12)+0.800(-5) = -2.4-4.0 = -6.4 \text{ percentage points}. $$

The estimate moves from \(-12\) toward the center of \(-5\), because its standard error is large relative to the modeled between-subgroup standard deviation. Under the stated fixed hyperparameters, its posterior standard deviation is:

$$ \sqrt{\frac{8^2(4^2)}{8^2+4^2}} = \sqrt{\frac{1024}{80}} = 3.578 \text{ percentage points}. $$

A conditional 95% normal credible interval is approximately \(-6.4 \pm 1.96(3.578)\), or \([-13.41,\,0.613]\) percentage points. Under this model and conditional on the stated hyperparameters, the interval contains 95% of the posterior probability for this subgroup effect. It is not a statement that there is a 95% chance that a fixed effect lies in this particular interval under repeated-sampling interpretation.

Partial Pooling Is Not Complete Pooling

The value of \(\tau\) controls how strongly the model links subgroup effects. If \(\tau=0\), the model forces every \(\theta_j\) to equal \(\mu_\theta\): this is complete pooling. If \(\tau\) is very large compared with the subgroup standard errors, the model gives little shrinkage and approaches separate estimation. Partial pooling lies between these extremes. Its strength is learned from the amount of variation among subgroup estimates relative to their sampling uncertainty.

In practice, a model may estimate \(\mu_\theta\) and \(\tau\) from all subgroup data, using maximum likelihood, restricted maximum likelihood, or a Bayesian model with priors for those parameters. The details depend on the outcome model and analysis goal. A small estimated \(\tau\) can lead to strong shrinkage, while a larger \(\tau\) preserves more subgroup-specific variation. With few subgroups, the data may provide little information about \(\tau\), so the estimate and the resulting shrinkage can depend appreciably on modeling choices.

Worked Example: Different Precision Means Different Shrinkage

Consider two hypothetical subgroup estimates on the same risk-difference scale, again in percentage points. Suppose the hierarchical center is \(-3\) percentage points and \(\tau=5\) percentage points. Subgroup A has \(y_A=-18\) with \(s_A=12\); subgroup B has \(y_B=-7\) with \(s_B=2\). Assume both estimates are approximately normal and target causal effects identified by the trial design.

For subgroup A:

$$ \lambda_A=\frac{5^2}{5^2+12^2}=\frac{25}{169}=0.1479, \qquad E(\theta_A\mid y_A,\mu_\theta,\tau) = -3+0.1479(-18+3) = -5.219. $$

The noisy estimate is pulled substantially from \(-18\) toward \(-3\). Its conditional posterior standard deviation is:

$$ \sqrt{\frac{12^2(5^2)}{12^2+5^2}} = \sqrt{\frac{3600}{169}} = 4.615 \text{ percentage points}. $$

For subgroup B:

$$ \lambda_B=\frac{5^2}{5^2+2^2}=\frac{25}{29}=0.8621, \qquad E(\theta_B\mid y_B,\mu_\theta,\tau) = -3+0.8621(-7+3) = -6.448. $$

The more precise estimate remains much closer to its observed value of \(-7\). Its conditional posterior standard deviation is \(\sqrt{4(25)/29}=1.857\) percentage points. Thus the same hierarchical center does not pull every subgroup by the same amount: shrinkage depends on each subgroup’s precision as well as on \(\tau\).

Worked Example: Retaining Meaningful Differences Between Groups

Suppose three hypothetical subgroups have estimated risk differences of \(-10\), \(-4\), and \(+2\) percentage points, with standard errors of \(2\), \(2\), and \(8\) percentage points, respectively. For illustration, take the model center to be \(-4\) percentage points and \(\tau=6\) percentage points. Assume valid causal estimates, approximately normal sampling distributions, and a common effect scale.

For the first subgroup, \(\lambda_1=36/(36+4)=0.900\), so its fitted effect is \(-4+0.900(-10+4)=-9.4\) percentage points. For the second, \(\lambda_2=0.900\), and its estimate equals the center, so its fitted effect remains \(-4\) percentage points. For the third, \(\lambda_3=36/(36+64)=0.360\), giving:

$$ E(\theta_3\mid y_3,\mu_\theta,\tau) = -4+0.360(2+4) = -1.84 \text{ percentage points}. $$

The third estimate is pulled strongly toward the center because its standard error is large, but its fitted effect is not forced to equal the other subgroup effects. The fitted values remain \(-9.4\), \(-4\), and \(-1.84\) percentage points. Whether the remaining differences are sufficiently well supported or clinically important requires examining their uncertainty and the relevant clinical context; the fact that a hierarchical model allows differences does not establish that any particular difference is real.

Causal Interpretation and Model Checks

Pooling improves the stability of estimates under the hierarchical model; it does not, by itself, make an estimate causal. The subgroup effects must first be defined for a clear population and effect scale. In a randomized trial, random assignment can support causal comparisons within subgroups, subject to issues such as loss to follow-up and adherence definitions. In observational data, causal interpretation requires suitable identification assumptions, including conditional exchangeability and positivity within the relevant subgroups, as well as a valid analysis of the outcome data. Shrinkage cannot remove confounding, selection bias, or measurement error.

The normal model also deserves scrutiny. Effects may not be well described by a normal distribution, subgroup estimates may have skewed sampling distributions, and a single shared distribution may be inappropriate when groups have distinct known characteristics. In addition, a model fitted on one scale does not establish homogeneity on another scale. For example, shrinking log-odds effects does not mean risk differences are being shrunk by the same amount. State the scale and the model clearly, and interpret results on that scale.

Common Mistake: “Pooling Means the Effects Are the Same”

  • Wrong reasoning: “The model uses information from all groups, so it assumes every group has one common treatment effect.”
  • Correction: Complete pooling imposes one common effect. Partial pooling instead allows subgroup effects to vary around a shared distribution. The model shrinks uncertain estimates toward the center, with the amount of shrinkage determined by subgroup precision and between-subgroup variation.
  • Another mistake: Treating a shrunken estimate as evidence that the original subgroup estimate was false. Shrinkage is a model-based response to uncertainty, not proof that an extreme estimate is an error. If the model is unsuitable, its stabilized estimates can still mislead.
Key takeaway: Partial pooling stabilizes subgroup effects by sharing information across groups while retaining group-specific estimates. Its value depends on sound causal identification, an appropriate effect scale, and a credible model for sampling error and between-subgroup variation.

Check Your Understanding

Use the model and distinctions in this tutorial to answer the following questions.

  1. In the normal hierarchical model, what do \(s_j\) and \(\tau\) represent, and how do they play different roles?
  2. For fixed \(\mu_\theta\) and \(\tau\), what happens to the shrinkage weight when a subgroup’s standard error becomes very small?
  3. A colleague says that partial pooling proves there is no effect modification. What is the error in that interpretation?
  4. Why can partial pooling not correct confounding in an observational subgroup analysis?
  5. What does \(\tau=0\) imply about the subgroup effects in this model, and how does that differ from partial pooling with \(\tau>0\)?
Clinical Biostats