Tutorials › Multiple Imputation by Chained Equations (MICE) › Cluster Indicators And Their Limits

Nested and Multilevel Data · Tutorial 336 of 497

Cluster Indicators And Their Limits

Learn how cluster indicators differ from random effects in chained-equation imputation, and diagnose when indicator-based models cannot support the imputation or prediction you need.

Advanced 10 min read

What You'll Learn

  • Specify a fixed-indicator imputation model for a level-1 variable.
  • Explain why sparse clusters make cluster-specific estimates unstable.
  • Distinguish imputing a level-2 variable as an outcome from using it as a predictor.
  • Identify when cluster indicators make a level-2 predictor nonidentifiable.
  • Compare fixed indicators with random effects for borrowing information and predicting new clusters.
  • Check indicator-based models for empty clusters, rank problems, and unsupported extrapolation.

Why Cluster Indicators Need Careful Interpretation

A cluster indicator is a flexible way to represent known clusters: a separate indicator for each cluster lets an imputation model assign each one its own intercept. That flexibility can be useful when the analysis concerns the particular observed clusters. But it does not automatically provide a sensible estimate for a cluster with few observations, a level-2 value that is entirely missing in a cluster, or a cluster that has not yet been observed.

The key distinction is whether the incomplete variable is measured on individuals within clusters or once per cluster. A level-1 variable can supply several observations within a cluster, although some may be missing. A level-2 variable has one value per cluster, even if it is copied onto every individual row in the data file. Treating those repeated copies as independent observations would falsely inflate the information available about it.

Definition: A fixed-indicator imputation model includes a separate indicator for each observed cluster, using a reference-cluster parameterization or an equivalent full-rank coding. It allows cluster-specific fitted means for the observed clusters but does not, by itself, define how to predict a cluster-specific effect for a new cluster. A random-effects imputation model represents cluster deviations as draws from a shared probability distribution, allowing information to be partially pooled across clusters under its distributional assumptions.

Both approaches are conditional-model choices within MICE. Neither makes an unsuitable conditional distribution appropriate, nor replaces a defensible missingness and analysis strategy. The earlier material on matching imputation to the multilevel estimand is relevant: the imputation model must preserve the between- and within-cluster information needed for the intended analysis.

What Fixed Indicators Estimate

Suppose \(Y_{ij}\) is a continuous level-1 variable for individual \(i\) in cluster \(j\), and there are \(J\) observed clusters. With cluster 1 as the reference, a simple indicator model is

$$ Y_{ij}=\alpha+\sum_{j=2}^{J}\gamma_j I(\text{cluster}=j)+\varepsilon_{ij}. $$

Here \(I(\text{cluster}=j)\) equals 1 for an individual in cluster \(j\) and 0 otherwise. Under this model, the fitted mean for cluster 1 is \(\alpha\), and the fitted mean for cluster \(j\) is \(\alpha+\gamma_j\). The model gives each observed cluster its own mean; it does not assume that a small cluster's mean should resemble the means of larger clusters.

For imputation, fitting these means is not the whole procedure. A proper stochastic imputation must represent uncertainty in the estimated model parameters and include residual variation for an individual value. Replacing every missing value by its cluster's fitted mean would suppress individual variation and understate uncertainty. Indicator models can be suitable when clusters are observed, have enough information, and cluster-specific predictions are the goal. Their main weakness is that the estimated cluster means do not borrow strength from one another.

Worked Example: A Sparse Cluster Has an Uncertain Mean

Suppose a hypothetical continuous level-1 measure is observed in two clusters. Cluster A has 25 observed values with mean 50, while cluster B has one observed value, 62. For illustration, suppose the residual standard deviation is known to be 5, and consider the uncertainty in a cluster's mean under a normal model with independent residuals.

With a fixed indicator for each cluster, the fitted mean for B is its observed mean, 62. Its standard error, under the stated residual model, is

$$ SE(\bar{Y}_B)=\frac{5}{\sqrt{1}}=5. $$

For A, the corresponding standard error is \(5/\sqrt{25}=1\). Thus the fixed-indicator model can fit both cluster means, but the evidence for B's mean is much less precise. A single observation does not make B's fitted mean as reliable as A's mean. In MICE, the uncertainty and residual variation must be reflected in the imputed draws; a plug-in value of 62 for every missing observation in B would not do so.

The calculation assumes independent, normally distributed residuals with the stated common standard deviation. It illustrates sampling precision, not proof that either cluster mean is correct. If the target is a prediction for another individual in B, that prediction also includes individual residual variation.

Why Random Effects Borrow Information

A simple random-intercept model assumes a cluster deviation \(u_j\) drawn from a common distribution. For a continuous response, one standard version is

$$ Y_{ij}=\mu+u_j+\varepsilon_{ij},\qquad u_j\sim N(0,\tau^2),\qquad \varepsilon_{ij}\sim N(0,\sigma^2), $$

with cluster deviations independent of residuals and, in the basic model, independent across clusters. The shared distribution is an assumption: clusters are treated as draws from a population of comparable clusters. Unlike fixed indicators, the model does not estimate an entirely unrelated mean for every cluster. A cluster's estimate is informed by its own data and by the assumed distribution across clusters. This partial pooling can stabilize estimates for sparse clusters, but it can be misleading if the exchangeability or distributional assumptions are not plausible.

The shrinkage in a simple normal model can be derived directly. Suppose \(\mu,\tau^2,\sigma^2\) are known, and a cluster has \(n_j\) observed values with mean \(\bar{Y}_j\). Conditional on \(u_j\), the sample mean has distribution \(N(\mu+u_j,\sigma^2/n_j)\). Combining that likelihood with the prior \(u_j\sim N(0,\tau^2)\) gives a normal conditional distribution. Completing the square in its density gives the conditional mean

$$ E(\mu+u_j\mid \bar{Y}_j) =\mu+w_j(\bar{Y}_j-\mu), \qquad w_j=\frac{n_j\tau^2}{\sigma^2+n_j\tau^2}. $$

Because \(0<w_j<1\), the conditional mean lies between the cluster sample mean and the population mean \(\mu\). The weight increases with cluster size: more observations make the cluster-specific data more informative relative to the shared distribution. This result explains the borrowing of information; it does not say that a random-effects model is always preferable. Imputation must still account for uncertainty in estimated parameters and residual variation.

Worked Example: Illustrative Shrinkage for a Small Cluster

Suppose, hypothetically, that the population mean is \(\mu=50\), the between-cluster variance is \(\tau^2=16\), and the residual variance is \(\sigma^2=36\). A cluster has \(n_j=2\) observed values with mean \(\bar{Y}_j=62\). Using the preceding conditional-mean formula,

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

The conditional mean for this cluster's mean is therefore

$$ 50+0.4706(62-50) =50+5.647 =55.65. $$

The indicator-only fitted mean would be 62. The random-effects conditional mean is closer to 50 because only two observations inform this cluster and the model assumes a common distribution of cluster deviations. This is an illustration with known variance components and population mean, not a complete MICE algorithm. In practice, uncertainty in those quantities and in the cluster effect must also be represented in the imputation procedure.

Level-2 Variables: Response Versus Predictor

The role of a level-2 variable matters. If an incomplete level-2 variable \(X_j\) is the response in an imputation model, a dummy-only regression can fit values for clusters where \(X_j\) is observed. But if an entire cluster has no observed value of \(X_j\), its own indicator has no outcome information from that cluster. The dummy-only model supplies no evidence for that cluster's missing value. Other cluster-level predictors or a model that borrows information under explicit assumptions may be needed.

That is different from including \(X_j\) as a predictor in a model for another response while also including a separate indicator for every cluster. Since \(X_j\) is constant within each cluster, its column is a linear combination of those indicators. Its coefficient cannot be separated from the cluster-specific intercepts. This is a design-matrix identification problem for the predictor coefficient, not a claim that regressing \(X_j\) on cluster indicators makes the predictor design matrix rank deficient.

Worked Example: A Missing Level-2 Response Is Not Recovered by Its Indicator

Consider four hypothetical hospitals, each with one level-2 binary value \(X_j\): A has 0, B has 1, C has 1, and D is missing. The variable is recorded once per hospital, not as four independent patient-level values per hospital. An indicator-only model can reproduce the observed values for A, B, and C. There is no observed \(X_D\) to inform D's cluster-specific fitted value.

For example, an indicator model using A as the reference can fit A's value through the intercept and B and C through their indicator coefficients. It cannot learn D's value from a D-specific observed response, because there is none. A different reference coding does not create information: a parameterization that assigns a coefficient to D still has no D outcome observations to estimate it from. Additional observed predictors or a distributional model across hospitals would be required, with assumptions appropriate to the cluster-level target.

The conclusion is limited to the dummy-only model and this missingness pattern. If some other information predicts \(X_D\), that information can support an imputation model. The example does not justify treating copied patient-row values as independent replications of a hospital-level measurement.

Worked Example: A Level-2 Predictor Is Collinear With Cluster Indicators

Now suppose the binary \(X_j\) values for hospitals A through D are 0, 1, 1, and 0, and a separate outcome \(Y_{ij}\) is measured for patients. Consider using \(X_j\) to predict \(Y_{ij}\) while including indicators for all four hospitals. The column for \(X_j\) is exactly the sum of the indicators for B and C:

$$ X_j=I(\text{hospital}=B)+I(\text{hospital}=C). $$

Consequently, a model containing both that \(X_j\) column and a complete set of hospital indicators has linearly dependent predictors. For any proposed coefficient of \(X_j\), its contribution can be offset by changing the coefficients of the B and C indicators, leaving every fitted value unchanged. The coefficient for \(X_j\) is therefore not separately identified. This is why the issue applies when the level-2 variable is a predictor alongside cluster indicators, not when it is the response in its own imputation model.

A random-effects model does not include an unrestricted fixed intercept for every cluster. It can estimate a between-cluster association under its distributional assumptions, but the interpretation and validity then depend on those assumptions. It is not a mechanical solution to collinearity if the model still includes unrestricted cluster-specific intercepts.

Prediction for New Clusters and Practical Checks

A fixed-indicator model has no indicator coefficient for a cluster not represented when the model was fitted. It therefore cannot estimate that new cluster's individual intercept without additional information or a new modeling rule. A random-effects model can make a population-level prediction for a new cluster by drawing a deviation from the assumed distribution, usually centered at zero before observing cluster-specific data. This supports prediction for new clusters only when the new clusters are plausibly drawn from the same population and the model's distributional assumptions are adequate. It does not provide a known, cluster-specific effect in advance.

For a model with \(\tau^2=16\) and \(\sigma^2=36\), for example, a new individual in a new cluster has variance \(16+36=52\) around the population mean under the simple model. The \(16\) represents variation between clusters and \(36\) variation between individuals within a cluster. A cluster average based on \(m=3\) individuals has variance \(16+36/3=28\). These predictive variances illustrate why a new-cluster prediction is not simply a fixed-indicator estimate borrowed from an arbitrary observed hospital.

Before using indicators in a MICE conditional model, check the structure and the intended prediction target. In particular:

  • Confirm whether the incomplete variable is level 1 or level 2, and represent a level-2 value only once in the likelihood contribution.
  • Check the number of observed values per cluster. A fitted mean based on one or two observations may be highly uncertain.
  • Check the model matrix for redundant columns, especially when a cluster-constant predictor is included with a full set of cluster indicators.
  • Identify clusters with no observed values of the imputation response. A dummy-only model cannot estimate their cluster-specific response mean.
  • Compare observed and imputed distributions by cluster, and check that stochastic draws retain appropriate within-cluster variation rather than repeating fitted means.

The main alternatives address different limitations. Fixed indicators provide flexible estimates for a finite set of observed clusters, but do not pool their estimates or naturally predict new clusters. Random effects provide partial pooling and a distribution for new-cluster deviations, but rely on assumptions about the cluster population and the random-effects distribution. A model with cluster-level predictors may improve prediction where relevant information exists, but it cannot manufacture information absent from the observed data. The choice should follow the estimand and the available information, not a general rule that one model is always superior.

Common Mistakes and Limitations

  • Confusing the response with a predictor. Regressing a level-2 variable on cluster indicators can fit its observed cluster values. The nonidentifiability described above arises when that variable is used as a predictor alongside indicators in a model for another response.
  • Assuming indicators borrow strength. Separate fixed cluster means do not become more stable merely because another cluster has many observations. Pooling requires an additional modeling assumption, such as a shared random-effects distribution.
  • Using patient rows as replication for a hospital-level value. Repeating a hospital's value across patients does not increase the number of independent hospital-level observations.
  • Assuming a new cluster has an estimated fixed effect. A new cluster has no fitted indicator coefficient. A random-effects model can offer a distribution-based prediction, not a data-estimated effect specific to that cluster.
  • Replacing missing values with fitted cluster means. This omits residual variation and parameter uncertainty. Imputation requires stochastic draws consistent with the conditional model.

Cluster indicators are not inherently inappropriate. They can be useful when the scientific target concerns a fixed set of well-observed clusters and the imputation model needs to preserve their distinct means. Their limits become important when clusters are sparse, a level-2 response is absent for an entire cluster, a level-2 predictor is combined with unrestricted cluster effects, or prediction must extend to new clusters.

Check Your Understanding

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

  1. A level-1 variable has 4 observed values in cluster A and 40 in cluster B. Does a fixed-indicator model make their fitted cluster means equally precise? Explain.
  2. A level-2 response is missing for every individual in one hospital, and the imputation model contains only hospital indicators. What information supports that hospital's missing value?
  3. A level-2 binary predictor equals 1 in hospitals B and C and 0 in A and D. Why is its coefficient not separately identified in a model that also has a full set of hospital indicators?
  4. What assumption lets a random-effects model support prediction for a new cluster, and what does that prediction represent?

Solutions. (1) No. Under a common residual standard deviation \(s\), the standard error of a cluster sample mean is \(s/\sqrt{n_j}\); with 4 rather than 40 observations, the estimate is less precise. (2) None from that hospital's own observed response under a dummy-only model. Other predictors or an explicitly specified model that borrows information would be needed. (3) The predictor column is the sum of the indicators for B and C, so it is a linear combination of the cluster-indicator columns; changing its coefficient can be offset by changing those indicator coefficients without changing fitted values. (4) The model assumes new clusters are drawn from the same population and random-effects distribution as the observed clusters. It predicts a population-based distribution for the new cluster, not a data-estimated fixed effect specific to that cluster.

Clinical Biostats