From a Random-Intercept Model to a Missing-Value Draw
A clustered outcome contains two sources of variation: differences between clusters and differences between individuals within the same cluster. An imputation that ignores the first source can make people in a cluster look more independent than they are. An imputation that uses only a cluster’s observed average can go too far in the other direction, treating that average as if it were known without error.
This tutorial works through the conditional calculation for one missing Gaussian outcome. It builds on the earlier material on Random-Intercept Imputation Models, but focuses on the arithmetic of conditioning on a cluster’s observed outcomes and then making a stochastic draw.
For this hand calculation, take \(\beta_0,\tau^2,\sigma^2\) as known. This simplifies the conditional distribution without claiming that real imputations should ignore parameter uncertainty. The model assumes a common intercept, normally distributed random intercepts and residuals, and constant residual variance. It also assumes that, given the cluster effect, individuals’ outcomes are conditionally independent. These assumptions should be assessed in the application: strong skew, outliers, changing within-cluster spread, or systematic cluster patterns not represented by the intercept can make the calculation a poor description of the data.
The calculation conditions on the observed outcomes in a cluster. It does not, by itself, establish that missingness is ignorable or that the imputation model is correctly specified for an analysis. Those conditions matter for valid inference; the conditional distribution below is the model-based draw once its inputs and assumptions are accepted.
Deriving the Cluster-Specific Conditional Distribution
Suppose cluster \(j\) has \(k\) observed outcomes \(y_{1j},\ldots,y_{kj}\). Write each observed outcome as its deviation from the population intercept, \(r_{ij}=y_{ij}-\beta_0\). Conditional on \(u_j\), these deviations have mean \(u_j\) and variance \(\sigma^2\). The prior distribution for \(u_j\) is normal with mean zero and variance \(\tau^2\).
The conditional density of \(u_j\) is proportional to the prior density times the likelihood of the observed outcomes. Collecting the terms involving \(u_j\) in the exponent gives a quadratic whose coefficient is the posterior precision and whose linear term determines the posterior mean:
Completing the square shows that the conditional distribution is normal. Define \(V_j\) as its variance and \(m_j\) as its mean:
Thus \(u_j\mid\text{observed outcomes}\sim N(m_j,V_j)\). For a missing outcome \(Y_{\mathrm{mis},j}\) in that cluster, the model gives \(Y_{\mathrm{mis},j}=\beta_0+u_j+\epsilon_{\mathrm{mis},j}\). The residual for that individual is independent of the observed outcomes and of \(u_j\). Adding the means and variances therefore gives the predictive distribution:
The \(V_j\) term represents uncertainty about the cluster’s contribution after seeing its observed outcomes. The \(\sigma^2\) term represents individual variation around that contribution. Both appear in the predictive variance; a conditional mean alone is not a stochastic imputation.
Worked Calculations
Worked Example: One Missing Outcome With Two Observed Cluster Members
Consider a hypothetical cluster with two observed outcomes, 58 and 46, and a third outcome that is missing. Let \(\beta_0=50\) points, \(\tau^2=16\) points squared, and \(\sigma^2=36\) points squared. The model treats these values as known for the calculation. The observed deviations from the intercept are \(8\) and \(-4\) points, so their sum is \(4\) points.
The conditional variance and mean of the cluster effect are
The predictive mean for the missing outcome is \(50+0.9412=50.9412\) points, and its predictive variance is \(8.4706+36=44.4706\) points squared. To make one conditional draw, suppose the standard-normal draw for the cluster effect is \(z_u=0.50\) and the residual draw is \(z_e=-0.40\). Then
and
This draw is close to 50 points, although the predictive mean is about 50.94 points. A single random draw need not equal its distribution’s mean. The example also shows why the cluster effect and individual residual are calculated separately: they represent different sources of variation.
Worked Example: How Cluster Evidence Is Shrunk Toward the Population
Use the same hypothetical model, with \(\beta_0=50\), \(\tau^2=16\), and \(\sigma^2=36\). Suppose each of two clusters has one observed outcome and one missing outcome. The observed values are 58 points in the first cluster and 42 points in the second.
For either cluster, \(k=1\), so
In the first cluster, the observed deviation is \(58-50=8\), giving \(m_1=11.0769(8/36)=2.4615\) points. Its missing outcome therefore has predictive mean \(50+2.4615=52.4615\) points. In the second cluster, the deviation is \(42-50=-8\), giving \(m_2=11.0769(-8/36)=-2.4615\) points and predictive mean \(47.5385\) points.
Each cluster’s observed deviation is pulled toward zero when estimating its random intercept. For example, the posterior mean for the first cluster is only \(2.4615\) points, rather than the full observed deviation of \(8\) points. With one observation, there is substantial uncertainty about whether that outcome reflects a lasting cluster difference or individual residual variation. The conditional variance \(11.0769\) points squared quantifies uncertainty about the cluster effect; a separate residual draw is still needed for the missing individual.
Worked Example: A Stochastic Draw Is Not a Predictive Mean
In a third hypothetical cluster, three observed outcomes are 54, 60, and 48 points. With \(\beta_0=50\), their deviations are \(4\), \(10\), and \(-2\), which sum to \(12\) points. Retain \(\tau^2=16\) and \(\sigma^2=36\).
The conditional variance and mean of the cluster effect are
The missing outcome has predictive mean \(50+2.2857=52.2857\) points and predictive variance \(6.8571+36=42.8571\) points squared. For a particular draw, take \(z_u=-0.25\) and \(z_e=-0.50\). Since \(\sqrt{6.8571}\approx2.6186\) points,
The imputed value is \(50+1.6311-3.000=48.6311\) points. This is one plausible draw from a predictive distribution centered at 52.2857 points; it is not an error merely because it falls below the mean. Replacing the draw with 52.2857 would remove both sources of predictive variation.
Applying the Calculation and Checking It
In an actual multiple-imputation procedure, the model parameters are generally not known. A proper procedure accounts for their uncertainty rather than treating estimates as fixed in every completed data set. The hand calculations above isolate the conditional outcome draw given specified parameter values; they do not include a parameter-draw step. Accordingly, they illustrate the within-model calculation, not a complete prescription for fitting and running a multilevel MICE algorithm.
When more than one outcome is missing in a cluster, the missing outcomes share the same cluster effect. A joint draw should use one draw of \(u_j\) for that cluster and a separate residual draw for each missing individual. Drawing a new cluster effect independently for every missing person would discard the dependence induced by their common cluster.
Several checks can reveal when the model or its implementation is going wrong:
- Verify the units. The means \(m_j\) and \(u_j\) are in outcome units; \(V_j,\tau^2,\sigma^2\) are in squared outcome units.
- Check the arithmetic in the precision \(1/\tau^2+k/\sigma^2\). More observed outcomes increase precision and reduce \(V_j\); they do not increase uncertainty about the cluster effect.
- Compare the distribution of observed cluster means and within-cluster residuals with the model’s assumptions. Marked skewness, influential observations, or visibly different residual spreads across clusters may indicate poor fit.
- Check completed-data draws for implausible values and inspect whether the cluster patterns are plausible. A normal model can generate values outside a bounded outcome’s possible range.
- Confirm that repeated missing outcomes in a cluster share one cluster-effect draw. Independent cluster-effect draws at the individual level produce the wrong dependence structure.
| Approach | What it does | Main limitation |
|---|---|---|
| Two-level conditional draw | Uses observed cluster outcomes to update the cluster effect and adds individual residual variation. | Relies on the stated model and, in a hand calculation, fixed parameter values. |
| Single-level normal draw | Uses a common outcome distribution without a cluster-specific contribution. | Does not represent dependence or cluster-level variation. |
| Fill in the predictive mean | Sets the missing outcome to \(\beta_0+m_j\). | Omits uncertainty about both the cluster effect and the missing individual’s residual. |
The alternatives are not interchangeable. A single-level model may be reasonable only if its assumptions match the data and estimand; a mean-only fill-in is a deterministic prediction, not a stochastic imputation. Conversely, a two-level normal model is not automatically adequate just because observations are clustered. It can be sensitive to the normality and variance assumptions, to poorly estimated model parameters, and to how the model represents the relevant predictors. A realistic draw under a misspecified model does not repair that misspecification.
Common Mistake
Check Your Understanding
Try each question, then compare your reasoning with the solutions.
- In the stated model, what two variance components make up the predictive variance for one missing outcome?
- Suppose a cluster has more observed outcomes, while the model variances stay fixed. What happens to the conditional variance \(V_j\) of its cluster effect?
- With \(\beta_0=50\), \(\tau^2=16\), and \(\sigma^2=36\), a cluster has one observed outcome of 54. Calculate \(V_j\), \(m_j\), and the predictive mean of a missing outcome.
- Why is setting every missing value to the predictive mean not equivalent to making a stochastic imputation?
- If two outcomes are missing in the same cluster, should their imputation use one shared cluster-effect draw or two independent cluster-effect draws? Explain.
Solutions. (1) The predictive variance is \(V_j+\sigma^2\): uncertainty about the cluster effect plus individual residual variance. (2) \(V_j=(1/\tau^2+k/\sigma^2)^{-1}\) decreases as \(k\) increases, because each observed outcome adds conditional precision. (3) \(V_j=(1/16+1/36)^{-1}=11.0769\). Then \(m_j=11.0769(54-50)/36=1.2308\) points, so the predictive mean is \(50+1.2308=51.2308\) points. (4) The predictive mean omits random variation in both the cluster contribution and individual residual; repeated mean fills also make the missing values artificially identical when the same mean is used. (5) Use one shared cluster-effect draw and separate residual draws, because individuals in the same cluster share \(u_j\) but have distinct residuals.