Tutorials › Multiple Imputation by Chained Equations (MICE) › Shrinkage And Cluster-Specific Predictions

Nested and Multilevel Data · Tutorial 365 of 497

Shrinkage And Cluster-Specific Predictions

Learn how partial pooling pulls cluster-specific predictions toward the overall mean, why the amount depends on cluster size, and how to preserve uncertainty when imputing missing outcomes.

Advanced 12 min read

What You'll Learn

  • Derive the posterior mean and variance of a cluster random intercept given observed outcomes.
  • Calculate the shrinkage factor and explain how it changes with cluster size.
  • Distinguish a cluster-specific conditional mean from a predictive distribution for a missing value.
  • Compare partial pooling with pooled and unpooled predictions.
  • Identify diagnostics and assumptions that matter when using shrinkage in multilevel imputation.
  • Explain why proper imputation draws are preferable to inserting conditional means.

Why Cluster-Specific Predictions Are Shrunk

In multilevel imputation, a cluster with only a few observed outcomes can have a highly variable estimated cluster effect. Treating that estimate as if it were known can make predictions for missing values too extreme. At the other extreme, ignoring all cluster information can erase genuine differences between clusters. A random-intercept model balances these sources of information: it lets each cluster have its own effect, while pulling uncertain cluster effects toward the population mean. This is partial pooling, and the pull is called shrinkage.

The amount of shrinkage is not a fixed correction applied equally to every cluster. It depends on the number of observed outcomes in that cluster and on the relative sizes of within-cluster and between-cluster variation. Consequently, predictions for a small cluster are typically pulled more strongly toward the overall mean than predictions for a large cluster.

Definition: In a random-intercept model, partial pooling means estimating each cluster’s effect using both its observed data and a common distribution for cluster effects. A shrinkage estimate is the resulting cluster effect estimate, typically closer to the population mean than the cluster’s unpooled estimate.

Model and Assumptions

Consider a continuous outcome \(Y_{ij}\) for individual \(i\) in cluster \(j\). Conditional on included covariates, write the model as

$$ Y_{ij} = \boldsymbol{x}_{ij}^{\mathsf T}\boldsymbol{\beta} + u_j + e_{ij}, \qquad u_j \sim N(0,\tau^2), \qquad e_{ij} \sim N(0,\sigma^2). $$

Here \(\boldsymbol{x}_{ij}^{\mathsf T}\boldsymbol{\beta}\) is the fixed part of the conditional mean, \(u_j\) is the cluster-specific random intercept, and \(e_{ij}\) is individual-level variation. The standard calculation below assumes that the random effects are independent across clusters, the residuals are independent across individuals conditional on the random effects, and the random effects and residuals are independent. It also assumes that the specified normal distributions and variance structure are adequate for the conditional outcome model. For this derivation, treat \(\boldsymbol{\beta}\), \(\tau^2\), and \(\sigma^2\) as known; uncertainty in these quantities must also be represented in a proper multiple-imputation procedure.

For a given cluster, subtract the fixed part from each observed outcome. Let \(r_{ij}=Y_{ij}-\boldsymbol{x}_{ij}^{\mathsf T}\boldsymbol{\beta}\) be this residual from the fixed part, and let \(n_j\) be the number of observed outcomes in cluster \(j\). Under the model, \(r_{ij}=u_j+e_{ij}\). The shrinkage calculation uses the cluster’s residual mean, \(\bar r_j\), rather than its raw outcome mean when covariates are present.

Deriving the Shrinkage Estimate

The observed residuals in a cluster provide information about \(u_j\), while the random-effects distribution gives a normal prior centered at zero with variance \(\tau^2\). Combining these two sources gives a normal conditional distribution for the cluster effect. Its mean is the shrinkage estimate, and its variance measures remaining uncertainty about that effect.

$$ u_j \mid \boldsymbol{r}_j \sim N\left( \frac{n_j\tau^2}{\sigma^2+n_j\tau^2}\bar r_j,\; \frac{\tau^2\sigma^2}{\sigma^2+n_j\tau^2} \right). $$

The multiplier \(B_j=n_j\tau^2/(\sigma^2+n_j\tau^2)\) is the shrinkage factor. Because \(0\leq B_j<1\), the conditional mean \(B_j\bar r_j\) lies between zero and the unpooled cluster residual mean. It approaches zero when the cluster supplies little information and approaches \(\bar r_j\) as the cluster becomes large relative to the variance ratio.

The formula follows by multiplying the normal likelihood for the residuals by the normal distribution of \(u_j\). Ignoring factors that do not depend on \(u_j\), the log of that product is

$$ -\frac{1}{2}\left[ \frac{u_j^2}{\tau^2} + \frac{\sum_i(r_{ij}-u_j)^2}{\sigma^2} \right]. $$

The terms involving \(u_j\) have quadratic coefficient \(\tau^{-2}+n_j\sigma^{-2}\) and linear coefficient \(\sum_i r_{ij}\sigma^{-2}\). Completing the square therefore gives posterior variance \((\tau^{-2}+n_j\sigma^{-2})^{-1} =\tau^2\sigma^2/(\sigma^2+n_j\tau^2)\) and posterior mean equal to that variance times \(\sum_i r_{ij}/\sigma^2\). Since \(\sum_i r_{ij}=n_j\bar r_j\), the mean is \(B_j\bar r_j\), as stated. If \(n_j=0\), the data provide no cluster-specific information, so the conditional mean is zero and the conditional variance remains \(\tau^2\).

Worked Example: A Small Cluster’s Shrunk Effect

Suppose, hypothetically, the fixed part of the model is 50 units for each member of a cluster, \(\tau^2=16\) units squared, and \(\sigma^2=36\) units squared. A small cluster has two observed outcomes, 64 and 56 units, so its residuals from the fixed part are 14 and 6 units.

The residual mean is \(\bar r_j=(14+6)/2=10\) units. The shrinkage factor is

$$ B_j=\frac{2(16)}{36+2(16)} =\frac{32}{68} =0.4706. $$

Thus the estimated cluster effect is \(B_j\bar r_j=0.4706(10)=4.706\) units. The unpooled estimate would be 10 units, while the fully pooled estimate would be zero. The partial-pooling estimate falls between them. The conditional mean for another outcome in this cluster is \(50+4.706=54.71\) units.

The conditional variance of the cluster effect is \(16(36)/68=8.471\) units squared. A new individual outcome also has residual variance 36 units squared, so the predictive variance, with parameters treated as known, is \(36+8.471=44.471\) units squared. Its predictive standard deviation is \(\sqrt{44.471}\approx6.669\) units. The predictive spread is not just uncertainty about the cluster effect; it also includes individual-level residual variation.

Cluster Size Changes the Amount of Shrinkage

The shrinkage factor increases with \(n_j\), holding the variance components fixed. For a large cluster, its observed residual mean is measured more precisely, so the data receive more weight relative to the common distribution of cluster effects. In a small cluster, a high or low residual mean could reflect substantial sampling variation, so the estimate is pulled more toward zero. The conditional variance of the cluster effect also decreases as \(n_j\) grows.

Worked Example: Comparing Small and Large Clusters

Use the same hypothetical model as above: fixed mean 50 units, \(\tau^2=16\) units squared, and \(\sigma^2=36\) units squared. Suppose a small cluster has two observed outcomes, 64 and 56, with residual mean 10 units. A larger cluster has 20 observed outcomes: 10 are 60 and 10 are 70 units. Its residual mean is therefore \((10(10)+10(20))/20=15\) units.

For the small cluster, \(B_j=32/68=0.4706\), so its estimated effect is \(0.4706(10)=4.706\) units and its predicted outcome mean is \(50+4.706=54.71\) units.

For the large cluster,

$$ B_j=\frac{20(16)}{36+20(16)} =\frac{320}{356} =0.8989. $$

Its estimated effect is \(0.8989(15)=13.48\) units, giving a predicted outcome mean of \(50+13.48=63.48\) units. The large cluster’s estimate is closer to its unpooled residual mean of 15 units than the small cluster’s estimate is to its unpooled mean of 10 units. The larger cluster has more information, but it is still partially pooled.

For the large cluster, the conditional variance of \(u_j\) is \(16(36)/356=1.6180\) units squared. The predictive variance for a new outcome in that cluster is \(36+1.6180=37.6180\) units squared, and its predictive standard deviation is \(\sqrt{37.6180}\approx6.133\) units. This is smaller than the small cluster’s predictive standard deviation of about 6.669 units, although the individual residual variance remains 36 units squared in both clusters.

Using Shrinkage in Imputation

The conditional mean is useful for understanding the expected value of a missing outcome, but it is not, by itself, a multiple imputation. If every missing value is replaced by its conditional mean, the imputed values have no residual variation around those means. They also fail to reflect uncertainty about the cluster effects. This can make completed data sets artificially alike and can understate uncertainty in subsequent analyses.

With parameters treated as known, an imputation for one missing outcome can be generated by first drawing \(u_j\) from its conditional distribution given the cluster’s observed outcomes, then drawing a new residual from \(N(0,\sigma^2)\), and adding both to the fixed part. In proper MICE, the parameter values should also be drawn or otherwise their uncertainty incorporated, consistently with the multilevel imputation model. This tutorial’s formulas describe the cluster-effect part of that calculation, not the full parameter-updating procedure.

Worked Example: A Predictive Draw Is Not the Conditional Mean

Continue the hypothetical example with the large cluster. Its conditional mean effect is about 13.48 units and its conditional standard deviation is \(\sqrt{1.61798}\approx1.272\) units. Its fixed mean is 50 units and its individual residual standard deviation is 6 units.

To illustrate one possible imputation draw, suppose a standard normal draw for the cluster effect is \(z_u=1\), and an independent standard normal residual draw is \(z_e=-0.5\). Then the sampled cluster effect is approximately \(13.48+1(1.272)=14.75\) units, and the sampled individual residual is \(-0.5(6)=-3\) units. The imputed outcome is therefore \(50+14.75-3=61.75\) units.

This single hypothetical draw is not a new estimate of the cluster mean; it is one value from the predictive distribution. Different random draws would produce different imputations. Across multiple completed data sets, that variation is essential for representing uncertainty rather than treating a conditional mean as an observed value.

Alternatives, Diagnostics, and Limitations

Partial pooling is a middle course between two simpler approaches. Full pooling uses one common mean and assigns no cluster-specific effects. No pooling estimates each cluster mean separately, without borrowing information across clusters. A random-intercept model uses cluster-specific information but moderates unstable estimates, which is especially relevant when cluster sizes vary.

ApproachCluster information usedTypical consequence
Full poolingAll observations contribute to one common mean; cluster identity does not alter the meanMay miss real between-cluster differences
No poolingEach cluster is estimated independentlySmall clusters can have highly unstable estimates
Partial poolingCluster observations and a shared distribution of cluster effectsBalances cluster-specific evidence with information across clusters

Shrinkage is not a remedy for a poorly specified model. Examine whether residual patterns differ systematically by cluster, whether the assumed within-cluster variation is plausible, and whether the estimated between-cluster variation is consistent with the observed data. Compare observed and imputed outcome distributions within clusters and across cluster sizes. If predictions for small clusters are all nearly identical, check that the imputation procedure is drawing appropriate uncertainty rather than inserting only conditional means. If large clusters remain excessively pulled toward the overall mean, check the model specification and variance components.

The Gaussian random-intercept formula is not automatically appropriate for binary, ordinal, count, or strongly skewed outcomes; those require conditional models suited to their outcome type. It also relies on the assumption that clusters are adequately represented by a common random-effects distribution. With very few clusters, the estimated variance components can be unstable; with covariates omitted from the imputation model, conditional predictions can be systematically wrong. Finally, the calculation assumes the fixed and variance parameters are known. In actual multiple imputation, their uncertainty and the missingness assumptions required for valid inference remain important.

Common Mistake

A common mistake is to say, “The small cluster’s mean residual is 10 units, so every missing outcome in that cluster should be imputed as 60 units.” That uses the unpooled cluster mean and ignores both shrinkage and predictive variation. Under the example’s model, the conditional mean for a new outcome in the small cluster is about 54.71 units, not 60. Even 54.71 is an expected value, not a suitable deterministic imputation: a proper imputation also draws uncertainty in the cluster effect and individual residual, and accounts for parameter uncertainty.

Key takeaway: In a random-intercept model, the cluster effect’s conditional mean is the observed cluster residual mean multiplied by a size- and variance-dependent shrinkage factor. Small clusters are pulled more toward the population mean; imputation should draw from the predictive distribution rather than substitute that conditional mean for every missing value.

Check Your Understanding

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

  1. If \(n_j=0\), what are the conditional mean and variance of the cluster effect under the stated model?
  2. For \(\tau^2=9\), \(\sigma^2=27\), and \(n_j=3\), calculate the shrinkage factor. If the cluster residual mean is 12 units, find the conditional mean effect.
  3. Why is a predictive variance for a missing outcome larger than the conditional variance of its cluster effect?
  4. A practitioner imputes every missing outcome using the cluster-specific conditional mean. What important uncertainty is omitted, and what can happen to the completed data sets?

Solutions. (1) With no observed outcomes, the cluster data provide no update: the conditional mean is 0 and the conditional variance is \(\tau^2\). (2) \(B_j=3(9)/(27+3(9))=27/54=0.5\). The conditional mean effect is \(0.5(12)=6\) units. (3) The predictive variance includes both uncertainty about the cluster effect and the individual residual variance: \(\sigma^2+\tau^2\sigma^2/(\sigma^2+n_j\tau^2)\), when parameters are treated as known. (4) It omits variation in the cluster effect, the individual residual, and, in a full imputation procedure, parameter uncertainty. Replacing missing outcomes by means can suppress variation and make completed data sets too similar.

Clinical Biostats