Why Subgroup Size Changes Shrinkage
In a clinical trial with several subgroups, a subgroup’s observed treatment effect may be imprecise because few patients contributed data. A hierarchical model combines that local evidence with information represented by the distribution of subgroup effects. The balance depends on both the estimated within-subgroup sampling precision and the between-subgroup variation allowed by the model. In particular, a larger subgroup generally gives its local estimate more influence.
This tutorial quantifies that relationship in a normal-normal model. The central quantity is the posterior weight on a subgroup’s observed mean. It is not a universal property of the subgroup: it depends on the sample size, the within-patient variance, and the assumed between-subgroup variance. The formulas below condition on fixed, known values of the hierarchical parameters, so the role of sample size is visible directly.
Model and Assumptions
Let \(X_{ij}\) be a continuous outcome for patient \(i\) in subgroup \(j\), and let \(\theta_j\) be the subgroup-specific mean treatment effect. Assume the following model for one subgroup:
Here \(\sigma^2\) is the within-subgroup variance of individual outcomes, while \(\tau^2\) is the between-subgroup variance of the true subgroup effects. For this calculation, \(\sigma^2\), \(\mu\), and \(\tau^2\) are treated as known, with \(\sigma^2>0\) and \(\tau^2>0\). Conditional on \(\theta_j\), the patient outcomes are independent and have the stated normal distribution. The subgroup effects are represented by a common normal distribution centered at \(\mu\). These assumptions specify the model; they do not establish that subgroups are in fact exchangeable or that the normal distributions fit a particular trial.
Write \(\bar{x}_j\) for the observed mean outcome in subgroup \(j\). Under the model, its sampling distribution is \(\bar{x}_j\mid\theta_j\sim N(\theta_j,\sigma^2/n_j)\). Thus, its sampling variance gets smaller as \(n_j\) grows. The posterior for \(\theta_j\) combines this sampling information with the normal distribution for subgroup effects.
Deriving the Posterior Weight
The posterior density is proportional to the sampling density times the prior density. Keeping only terms involving \(\theta_j\), its log density is
Collecting the quadratic and linear terms in \(\theta_j\) gives a normal posterior. Its precision is the sum of the data precision \(n_j/\sigma^2\) and prior precision \(1/\tau^2\); its mean is the precision-weighted average:
The form of the mean follows by multiplying the two precisions by \(V_j\): \(V_j n_j/\sigma^2=n_j\tau^2/(\sigma^2+n_j\tau^2)=w_j\), and \(V_j/\tau^2=\sigma^2/(\sigma^2+n_j\tau^2)=1-w_j\). This also verifies that the two weights sum to one.
The expression \(w_j=\tau^2/(\tau^2+\sigma^2/n_j)\) compares between-subgroup variance with the sampling variance of the observed subgroup mean. If sampling variance is large relative to \(\tau^2\), the local estimate receives less weight. If sampling variance is small, the observed mean receives more. The posterior variance \(V_j\) is smaller than either variance in the comparison, because combining independent normal information adds precision.
Worked Calculations
Worked Example: A Larger Subgroup Gets More Local Weight
Suppose a hypothetical trial estimates a subgroup’s mean treatment effect in mmHg. Use \(\mu=1\) mmHg, \(\tau=8\) mmHg, and a known patient-level standard deviation \(\sigma=12\) mmHg. In a subgroup of \(n_j=36\) patients, the observed mean effect is \(\bar{x}_j=7\) mmHg. Assume the patient outcomes are independent and normally distributed as specified above, and that the subgroup effect follows the stated normal distribution.
The sampling variance of the mean is \(\sigma^2/n_j=144/36=4\) \((\mathrm{mmHg})^2\). The local-data weight is
The posterior mean is \(0.9412(7)+0.05882(1)=6.647\) mmHg. Equivalently, the observed estimate is \(6\) mmHg above \(\mu\), and shrinkage removes \(1-w_j=0.05882\) of that distance: \(7-0.05882(7-1)=6.647\) mmHg. The posterior variance is \(V_j=64(4)/(64+4)=3.765\) \((\mathrm{mmHg})^2\), giving posterior standard deviation \(\sqrt{3.765}=1.940\) mmHg. These posterior summaries are conditional on the model parameters treated as known.
Worked Example: The Same Estimate With Fewer Patients
Keep the hypothetical model parameters and observed mean from the previous calculation, but suppose only \(n_j=4\) patients contribute to this subgroup. The assumed outcome distribution and independence conditions are unchanged. The observed mean is still \(7\) mmHg, but its sampling variance is now \(144/4=36\) \((\mathrm{mmHg})^2\).
The local-data weight is
The posterior mean becomes \(0.64(7)+0.36(1)=4.840\) mmHg. The observed estimate is still \(6\) mmHg above \(\mu\), but the model now removes \(0.36(6)=2.160\) mmHg of that distance. The posterior variance is \(64(36)/(64+36)=23.04\) \((\mathrm{mmHg})^2\), and its standard deviation is \(4.800\) mmHg. Compared with the subgroup of 36 patients, this smaller subgroup has a lower local-data weight and greater posterior uncertainty. The calculation does not say the smaller subgroup’s estimate is wrong; it says that, under the model, it is less precise.
Choosing a Sample Size for a Shrinkage Target
The weight formula can also be rearranged to find the sample size needed for a desired degree of local influence. For a target local-data weight \(c\), where \(0<c<1\), requiring \(w_j\geq c\) is equivalent to
The right-hand side is a threshold under the assumed values of \(\sigma^2\) and \(\tau^2\); an integer sample size must meet or exceed it. This is a way to describe the model’s weighting, not by itself a trial sample-size justification. A design must also address its clinical objective, operating characteristics, and uncertainty about the assumed parameters.
Worked Example: Requiring at Least 80% Local Weight
For a hypothetical continuous endpoint, suppose \(\sigma=10\) mmHg and \(\tau=5\) mmHg, with \(\mu=2\) mmHg. Find the smallest subgroup size for which the local-data weight is at least \(0.80\). Assume the normal sampling and subgroup distributions, independence, and fixed known parameters described above.
Substitution into the threshold gives
At \(n_j=16\), the sampling variance is \(100/16=6.25\) \((\mathrm{mmHg})^2\), and \(w_j=25/(25+6.25)=0.8000\). For an observed mean of \(6\) mmHg, the posterior mean is \(0.80(6)+0.20(2)=5.200\) mmHg. At \(n_j=15\), the weight is \(375/(100+375)=0.7895\), which is below the target. Therefore 16 is the smallest integer sample size meeting the stated threshold under these assumptions.
How to Read the Relationship
For fixed positive \(\sigma^2\) and \(\tau^2\), \(w_j\) increases with \(n_j\). One way to check this is to differentiate its expression:
Thus, increasing the subgroup size increases the local-data weight, but the rate of increase slows as \(n_j\) becomes large. In the limiting cases, \(w_j\) approaches zero as \(n_j\) approaches zero and approaches one as \(n_j\) grows without bound. Likewise, at fixed sample size, greater \(\tau^2\) gives the subgroup effects more room to differ from \(\mu\), so the local estimate receives more weight. If \(\tau^2\) approaches zero, the hierarchy concentrates subgroup effects near \(\mu\), and the local weight approaches zero.
Shrinkage changes the posterior mean’s distance from \(\mu\) according to
This makes clear that the amount moved, in outcome units, also depends on the observed distance \(\bar{x}_j-\mu\). Two subgroups can have the same weight but different movements because their observed means differ. Conversely, a low weight need not imply a large numerical change if the observed mean is already close to \(\mu\).
Assumptions, Diagnostics, and Alternatives
The formula is exact for the stated normal model with fixed, known parameters. In practice, its usefulness depends on whether the model represents the data and the scientific structure adequately. Potential warning signs include influential observations, marked departures from the assumed outcome distribution, unequal within-subgroup variances when a common \(\sigma^2\) is used, or subgroup effects that do not plausibly share a common distribution. A particularly important warning is a subgroup estimate far from \(\mu\): the formula still shrinks it, but the size of that movement is justified only if the hierarchical model is credible.
The result also conditions on \(\mu\) and \(\tau^2\) as fixed. If they are uncertain, a full hierarchical analysis accounts for their posterior uncertainty. The simple formula can then be used conditionally for given hyperparameter values, but substituting a single estimate or posterior average for \(\tau^2\) does not generally reproduce the full posterior mean. Sensitivity to plausible values of \(\tau^2\) is especially relevant because the assumed heterogeneity directly controls the balance between local and hierarchical information.
The main alternatives differ in whether they allow information to move across subgroups. No pooling estimates each subgroup separately, giving its local estimate full weight and foregoing borrowing. Complete pooling treats all subgroup effects as identical, effectively giving the hierarchical center complete influence. Partial pooling, as in the normal-normal model here, permits differences while combining local data with the shared distribution. The earlier material on partial pooling establishes this distinction; the present weight formula shows how sample size adjusts the local-versus-hierarchical balance within this specific model.
Shrinkage is not a guarantee of improved inference. It can stabilize noisy estimates when the shared-distribution assumptions are appropriate, but it can also pull a genuinely distinct subgroup toward an inappropriate center. Nor should a subgroup’s weight alone be interpreted as evidence about whether its treatment effect is clinically important. It is a model-based measure of the relative contribution of its observed mean to its posterior mean.
Common Mistake
Check Your Understanding
Answer each question using the fixed-parameter normal-normal model, then compare with the solutions.
- If \(\sigma^2=64\), \(\tau^2=16\), and \(n_j=8\), calculate the local-data weight.
- With the parameters in question 1, \(\mu=0\), and \(\bar{x}_j=10\), calculate the posterior mean.
- For \(\sigma^2=100\), \(\tau^2=25\), what is the smallest integer \(n_j\) that gives a local-data weight of at least \(0.90\)?
- What happens to the local-data weight as \(\tau^2\) approaches zero, and what does this represent in the model?
- Why does a calculated local-data weight not, by itself, show that shrinkage is scientifically appropriate?
Solutions. (1) \(w_j=8(16)/(64+8(16))=128/192=0.6667\). (2) \(m_j=0.6667(10)+0.3333(0)=6.667\), in the same units as the outcome. (3) The threshold is \(n_j\geq 0.90(100)/[(1-0.90)(25)]=90/2.5=36\), so the smallest integer is 36. (4) The weight approaches zero: the assumed distribution of subgroup effects concentrates at \(\mu\), leaving essentially no between-subgroup variation in the model. (5) The weight follows from the model’s assumptions. If the common hierarchical distribution, normal sampling model, or variance assumptions are not credible, the resulting pull toward \(\mu\) may be misleading.