Why an Imputation Model Needs a Cluster Effect
When a continuous variable is incomplete in nested data, the imputation model should represent the way observations in the same cluster are related. For example, patients treated at the same clinic may have similar outcomes after accounting for recorded predictors. A model that treats all patients as independent can miss that shared variation and produce completed data with too little within-cluster resemblance.
A random-intercept model represents this dependence by giving each cluster its own deviation from the overall intercept. The deviation is shared by every observation in that cluster. The model is useful only with assumptions that justify its conditional mean and covariance; in particular, a mean-zero random intercept alone does not ensure mean zero after conditioning on predictors.
Assumptions and What They Imply
For the standard normal version, assume the random intercepts are independent across clusters and \(u_j\sim N(0,\tau^2)\). Crucially, assume the collection of random intercepts is independent of the complete predictor array, including predictors at either level. This means the random intercept remains mean zero with variance \(\tau^2\) when conditioning on the predictors. The assumption is stronger than merely specifying a marginal mean of zero.
Assume also that, conditional on the predictors and random intercepts, the residuals have mean zero and variance \(\sigma^2\), are independent across individuals, and are independent of the random intercepts. In the normal model, take \(\varepsilon_{ij}\sim N(0,\sigma^2)\) under that conditioning. Clusters are independent of one another. These conditions yield the following formulas after the random intercept is integrated out:
Here \(\mathbf{X}\) denotes the full predictor array. For two different individuals \(i\) and \(k\) in the same cluster, \(\operatorname{Cov}(Y_{ij},Y_{kj}\mid\mathbf{X})=\tau^2\). For individuals in different clusters, the conditional covariance is zero. If the normal assumptions hold, the outcomes within a cluster have a multivariate normal conditional distribution with this covariance structure.
The fixed effects describe the systematic part of the conditional mean. Holding other predictors fixed, a one-unit increase in predictor \(r\) changes the conditional mean by \(\beta_r\) outcome units. The intercept \(\beta_0\) is the mean at zero values of all predictors, for a cluster whose random intercept is zero; it may not be substantively useful if zero is outside the relevant predictor range. The variance \(\tau^2\) measures variation between cluster intercepts, while \(\sigma^2\) measures residual variation between individuals within a cluster after accounting for predictors and the cluster intercept.
Deriving the Dependence
The covariance follows from separating the shared and individual terms. Conditional on the predictors, write each outcome as its fixed mean plus \(u_j+\varepsilon_{ij}\). The independence assumptions make the covariance of the two residuals zero and their covariances with \(u_j\) zero. The only term shared by the two individuals is \(u_j\):
For a single observation, the same decomposition gives \(\operatorname{Var}(Y_{ij}\mid\mathbf{X})=\tau^2+\sigma^2\). Therefore, the conditional correlation between two distinct observations in the same cluster is
This is the intraclass correlation coefficient (ICC) for the random-intercept model: the fraction of the conditional outcome variance attributable to between-cluster variation. It is between zero and one when both variance components are nonnegative and their sum is positive. The ICC describes residual clustering after accounting for the predictors in the model; it is not necessarily the raw correlation in the unadjusted data.
Worked Example: Interpreting Variance Components
Suppose a hypothetical model for a continuous symptom score, measured in points, estimates \(\tau^2=9\) points squared and \(\sigma^2=16\) points squared. Assume the random-intercept model and its independence conditions are appropriate.
The conditional variance for one individual is \(\tau^2+\sigma^2=9+16=25\) points squared, so the conditional standard deviation is \(\sqrt{25}=5\) points. For two different individuals in the same clinic, the conditional covariance is \(9\) points squared, because their outcomes share the clinic intercept.
The ICC is \[ \rho=\frac{9}{9+16}=\frac{9}{25}=0.360. \] Thus, under this model, 36.0% of the conditional outcome variance is between clinics, and two otherwise predictor-conditioned observations from the same clinic have correlation 0.360. The remaining 64.0% is individual residual variation. This is a model-based description, not a claim that clinic membership causes the observed differences.
Fixed Effects and Cluster-Specific Means
For a particular cluster, the conditional mean given its random intercept is \(\beta_0+\mathbf{x}_{ij}^{\mathsf T}\boldsymbol{\beta}+u_j\). Thus, \(u_j\) shifts the mean for every individual in cluster \(j\) by the same number of outcome units. A positive value indicates a cluster intercept above the population-average intercept, and a negative value indicates one below it. Since \(E(u_j\mid\mathbf{X})=0\) under the independence assumption, the predictor-only conditional mean averages over clusters and does not include an extra intercept shift.
Worked Example: Interpreting the Fixed Part
Consider a hypothetical model for a continuous recovery score in points, with a single predictor \(x_{ij}\) equal to treatment hours: \[ Y_{ij}=40+2.5x_{ij}+u_j+\varepsilon_{ij}, \] where \(u_j\sim N(0,4)\) and \(\varepsilon_{ij}\sim N(0,9)\), independently across clusters and individuals and independently of the predictors. Suppose the predictor is measured in hours and the score is modeled linearly over the range being considered.
The fixed slope is \(2.5\) points per hour: comparing observations that differ by one treatment hour, the model's conditional mean differs by 2.5 points, holding cluster effect and other predictors fixed. At \(x_{ij}=6\), the predictor-only mean is \(40+2.5(6)=40+15=55\) points. In a cluster with \(u_j=1.2\) points, the mean conditional on that cluster effect is \(55+1.2=56.2\) points.
The total conditional variance after integrating over \(u_j\) is \(4+9=13\) points squared. Two individuals in the same cluster have covariance \(4\) points squared, and the ICC is \(4/13=0.3077\). These calculations rely on the stated independence of \(u_j\) and the predictor; without it, the predictor-only mean need not be \(40+2.5x_{ij}\).
When the Independence Assumption Fails
The assumption that random intercepts are independent of predictors is consequential. If a predictor carries information about a cluster's unobserved intercept, then conditioning on that predictor can change both the mean and variance of the random intercept. The usual formulas for the predictor-only mean and within-cluster covariance no longer follow simply from \(E(u_j)=0\) and \(\operatorname{Var}(u_j)=\tau^2\).
Worked Example: A Predictor That Reveals the Random Intercept
For illustration, suppose the true hypothetical data-generating model is \(Y_{ij}=10+2X_{ij}+u_j+\varepsilon_{ij}\), with \(u_j\sim N(0,4)\), and independent residuals of mean zero and variance \(1\). Now let \(X_{ij}=u_j\) for every individual in cluster \(j\). This violates the assumption that the random intercept is independent of the predictors.
Because \(u_j=X_{ij}\), the outcome can be rewritten as \(Y_{ij}=10+3X_{ij}+\varepsilon_{ij}\). Hence \(E(Y_{ij}\mid X_{ij})=10+3X_{ij}\), not \(10+2X_{ij}\). Further, once the predictor values are known, the shared random intercept is known exactly. For two individuals in the same cluster, their conditional covariance given the predictors is therefore \(\operatorname{Cov}(\varepsilon_{ij},\varepsilon_{kj}\mid\mathbf{X})=0\), not \(4\).
The marginal random-intercept variance is still 4, but that does not make it the conditional variance of \(u_j\) given predictors. This example shows why the predictor-independence condition must be stated before using the standard conditional mean and covariance expressions.
Using the Model for Imputation
In a chained-equations setting, a random-intercept model can serve as the conditional model for an incomplete continuous variable, with available predictors included in its fixed part. The cluster term allows the conditional distribution to retain shared variation among individuals from the same cluster. When simulated completed data are intended to represent that dependence, imputations need to reflect both variation between clusters and individual residual variation; simply adding independent noise to a single-level fitted mean does not represent the stated model.
This model specifies one conditional distribution. It does not by itself establish that all conditional models in a chained-equations system are mutually compatible, determine the missingness mechanism, or guarantee that the chosen predictors and functional forms are adequate. The substantive estimand and the earlier material on matching imputation to the multilevel estimand remain relevant: a model's random-effects structure should support the analysis that will be applied to the completed data.
Diagnostics, Alternatives, and Limits
Useful checks focus on whether the model's structure is credible and whether its implications are visible in the observed data. Examine residual patterns against fitted values and predictors for nonlinearity or changing residual spread. Compare observed cluster means and within-cluster variation with model-implied patterns, and inspect whether a small number of clusters dominate the estimated between-cluster variation. A variance estimate near zero suggests little estimated residual clustering under this specification, though it does not prove that all dependence is absent. A very large estimated \(\tau^2\), implausible cluster shifts, or systematic residual patterns can signal misspecification.
These checks cannot directly validate the unobserved values, and observed cluster patterns can also reflect omitted predictors. Investigate whether predictors plausibly relate to unobserved cluster differences; the independence assumption is substantive, not established merely by a normality plot. Normality of random intercepts and residuals matters to the normal imputation distribution, particularly in small or influential parts of the data. Strong skewness, outliers, nonconstant residual variance, or a mean relationship that is not adequately represented by the fixed part may call for a different specification.
| Approach | What it represents | Important limitation |
|---|---|---|
| Single-level model without cluster effects | Predictor effects with one residual variance, treating observations as conditionally independent | Does not represent the shared cluster dependence of a random intercept |
| Random-intercept model | A distribution of cluster-specific intercept shifts, with common within-cluster dependence | Assumes a suitable random-intercept distribution and independence from predictors |
| Fixed cluster indicators | A separate intercept for each observed cluster | Does not model a distribution of cluster effects; many indicators can be costly, and extrapolation to new clusters is not directly specified |
A random intercept also assumes that the cluster shift is constant across predictor values: slopes do not vary by cluster. If the relationship between a predictor and the outcome differs systematically across clusters, this model may be too restrictive. Random slopes and more complex cluster structures require additional assumptions and are separate extensions. Unequal cluster sizes, a small number of clusters, and missing predictors can also make estimation or imputation more challenging; the simple model does not automatically resolve those issues.
Common Pitfalls
- Using marginal mean zero as if it were conditional mean zero. The claim \(E(u_j\mid\mathbf{X})=0\) requires an appropriate independence assumption; it does not follow from \(E(u_j)=0\) alone.
- Calling \(\tau^2\) the within-cluster residual variance. It is between-cluster intercept variance. The individual residual variance is \(\sigma^2\).
- Ignoring the shared term when deriving covariance. Conditional residual independence does not make outcomes from the same cluster independent after \(u_j\) is integrated out.
- Interpreting a fixed slope causally. The coefficient describes a model-based conditional mean difference; causal interpretation requires additional design and identification assumptions.
- Assuming a random intercept solves every multilevel problem. It represents a common cluster shift, not cluster-specific slopes, nonlinearities, or every possible source of dependence.
Check Your Understanding
Answer each question using the model assumptions stated in this tutorial. Short solutions follow the questions.
- If \(\tau^2=6\) and \(\sigma^2=14\), what are the conditional variance of one observation and the ICC?
- Why does a mean-zero random intercept not, by itself, justify the usual predictor-only conditional mean?
- In a random-intercept model, what component induces covariance between two different individuals in the same cluster?
- Name one kind of dependence or heterogeneity that a random-intercept-only model does not represent.
Solutions. (1) The variance is \(6+14=20\) outcome-units squared, and the ICC is \(6/20=0.300\). (2) If the random intercept depends on predictors, its conditional mean given those predictors can be nonzero even when its marginal mean is zero. (3) The shared random intercept \(u_j\), whose conditional variance is \(\tau^2\), induces the covariance. (4) For example, the model does not represent predictor slopes that vary across clusters.