Tutorials › Multiple Imputation by Chained Equations (MICE) › Respecting Model Hierarchy During Imputation

Imputation-Model Compatibility With the Analysis Model · Tutorial 275 of 497

Respecting Model Hierarchy During Imputation

Learn how to preserve the lower-order terms associated with interactions when specifying MICE conditional models, and how to detect the consequences of leaving them out.

Advanced 10 min read

What You'll Learn

  • Define strong and weak hierarchy for interaction models.
  • Derive an imputation conditional from an analysis model with an interaction.
  • See how lower-order terms enter that conditional and why they matter.
  • Compare hierarchical and reduced imputation specifications using hypothetical data.
  • Diagnose hierarchy violations and understand what hierarchy does not guarantee.

Why hierarchy matters for imputation

An interaction says that the relationship between one variable and the outcome depends on another variable. A model containing an interaction therefore needs enough terms to represent both that changing relationship and the variables’ lower-order contributions. This principle is called model hierarchy. It is not merely a convention about how to write a regression formula: omitting lower-order terms can change the model’s predictions, and an imputation model with those omissions may fail to preserve relationships required by the analysis.

For MICE, the key question is how the analysis model’s interaction structure is reflected in the conditional model used to impute a variable. If \(X\) is incomplete and the analysis includes \(X Z\), the conditional distribution of \(X\) given the outcome \(Y\) and \(Z\) will generally involve terms in \(Y\), \(Z\), and \(Y Z\). The exact form depends on the assumed distributions, but an imputation regression that drops relevant lower-order terms may not represent that conditional distribution.

Definition: In an interaction model, strong hierarchy requires that whenever an interaction term is included, all of its constituent main effects are included. For a two-variable interaction \(X Z\), this means including \(X\) and \(Z\). Weak hierarchy requires at least one of the constituent main effects to be included whenever their interaction is included. These are model-specification principles; they do not, by themselves, guarantee that an imputation model is compatible with an analysis model.

Hierarchy in an analysis model and its conditional

Consider the linear analysis model

$$ Y=\beta_0+\beta_X X+\beta_Z Z+\beta_{XZ}XZ+\varepsilon. $$

With strong hierarchy, the interaction \(XZ\) appears alongside both \(X\) and \(Z\). If \(X\) is missing, however, the imputation model is not simply a copy of this equation with \(X\) as its response: it models \(X\) conditionally on observed information, including \(Y\) and \(Z\). In general, conditioning on \(Y\) changes the functional form. The interaction can induce an interaction between \(Y\) and \(Z\) in the conditional mean of \(X\).

The following derivation makes this point under explicit assumptions. Suppose \(Z\) is binary, \(X\mid Z=z\sim N(0,1)\), and

$$ Y\mid X,Z=z \sim N(\alpha_z+a_zX,1). $$

Assume these distributions are correctly specified, the residual variation in \(Y\) is independent of \(X\) given \(Z\), and the stated variances are known. The conditional distribution of \(X\) given \(Y=y,Z=z\) follows by multiplying the normal prior density for \(X\) by the normal likelihood for \(Y\).

$$ \begin{aligned} p(x\mid y,z) &\propto \exp\left\{-\frac{1}{2}x^2-\frac{1}{2}(y-\alpha_z-a_zx)^2\right\},\\ E(X\mid Y=y,Z=z) &=\frac{a_z(y-\alpha_z)}{1+a_z^2},\\ \operatorname{Var}(X\mid Y=y,Z=z) &=\frac{1}{1+a_z^2}. \end{aligned} $$

To see the mean, expand the exponent’s quadratic terms in \(x\): the coefficient of \(x^2\) is \(-(1+a_z^2)/2\), and the linear term is \(a_z(y-\alpha_z)x\). Completing the square gives a normal distribution with the mean and variance shown. Variation in \(\alpha_z\) can induce a \(Z\) term, while variation in \(a_z\) can induce a \(YZ\) term; both may vary.

Worked Example: Deriving the Hierarchical Imputation Conditional

Suppose hypothetical data follow \(X\mid Z=z\sim N(0,1)\), and \(Y\mid X,Z=z\sim N(\alpha_z+a_zX,1)\). Let \(Z=0\) have \(\alpha_0=0,a_0=1\), and \(Z=1\) have \(\alpha_1=-2,a_1=3\). Find \(E(X\mid Y,Z)\) in each group and express the result using \(Y,Z,YZ\).

For \(Z=0\), the conditional mean is

$$ E(X\mid Y,Z=0)=\frac{1(Y-0)}{1+1^2}=\frac{1}{2}Y=0.5Y. $$

For \(Z=1\), it is

$$ E(X\mid Y,Z=1)=\frac{3(Y-(-2))}{1+3^2} =\frac{3(Y+2)}{10}=0.3Y+0.6. $$

In particular, at \(Y=0,Z=1\), the calculation is \( -3(0-2)/(1+3^2)=6/10=0.6\). The positive sign matters: the conditional mean in this group at \(Y=0\) is \(0.6\), not \(-0.6\).

Since \(Z\) is either zero or one, combine the group-specific means as

$$ E(X\mid Y,Z)=0.5Y+0.6Z-0.2YZ. $$

When \(Z=0\), this reduces to \(0.5Y\); when \(Z=1\), it becomes \(0.3Y+0.6\). Thus an imputation regression for \(X\) needs the lower-order terms \(Y\) and \(Z\), as well as the interaction \(YZ\), to represent this conditional mean. Under the stated normal assumptions, its conditional variance is \(0.5\) for \(Z=0\) and \(0.1\) for \(Z=1\).

What lower-order omissions do

If the imputation conditional is restricted to an interaction term alone, such as \(X\) regressed on \(YZ\) without an intercept or the main effects, it cannot reproduce the example’s conditional means. At \(Z=0\), \(YZ=0\) for every value of \(Y\), so this restricted model predicts the same conditional mean for every \(Y\), while the derived mean is \(0.5Y\). At \(Y=4,Z=0\), the derived mean is \(2\), but an interaction-only model predicts zero.

Even omitting just \(Z\) can matter. A model with an intercept and predictors \(Y\) and \(YZ\), but not \(Z\), predicts the same mean at \(Y=0\) for both groups: both product terms vanish, leaving only the intercept. The derived means at that value are \(0\) for \(Z=0\) and \(0.6\) for \(Z=1\). The omitted \(Z\) term prevents the conditional model from representing this difference.

Worked Example: A Change of Origin Does Not Remove Hierarchy

Consider the hypothetical analysis mean \(1+X+Z+2XZ\). Shift the origins by defining \(X'=X-1\) and \(Z'=Z-1\), so \(X=X'+1\) and \(Z=Z'+1\). Expand the model in the shifted variables.

Substitution gives

$$ \begin{aligned} 1+(X'+1)+(Z'+1)+2(X'+1)(Z'+1) &=1+X'+1+Z'+1+2X'Z'+2X'+2Z'+2\\ &=5+3X'+3Z'+2X'Z'. \end{aligned} $$

The constant is \(5\), and both lower-order terms remain. This illustrates why a specification that includes an interaction but excludes its main effects can depend on the arbitrary choice of origin. Including the lower-order terms gives the model the flexibility to represent the same relationship under such a change of coordinates.

Key distinction: The analysis interaction \(XZ\) does not mean that the imputation regression for \(X\) should include \(XZ\), because \(X\) is its response. Rather, derive or specify the conditional model for \(X\) given the outcome and other predictors. In the example, that conditional uses \(Y\), \(Z\), and \(YZ\). The terms needed in the imputation conditional are determined by the conditional relationship, not by copying the analysis formula mechanically.

Hierarchy choices and practical specification

Strong hierarchy is a clear default for interactions: retain each component main effect in the model where it is a predictor. Weak hierarchy is less restrictive and may be used in some modeling contexts, but retaining only one main effect can still exclude meaningful patterns. For imputation, the more important issue is whether the conditional model can represent the relationships implied by the analysis. A hierarchical formula is often a useful safeguard, but it is not a proof of compatibility; the conditional distributions and their functional forms still matter.

For an incomplete \(X\) and a binary \(Z\), a practical specification informed by an analysis interaction might include \(Y\), \(Z\), and \(Y Z\) as predictors when imputing \(X\), subject to appropriate model types for the variables. If imputing \(Z\), the relevant conditional needs to be considered afresh; simply reusing the \(X\)-conditional formula is not justified. MICE fits a sequence of conditional models, and the choices for each incomplete variable must be checked against the intended analysis relationships.

The main alternative to a deliberately hierarchical conditional model is a reduced additive specification that drops one or more terms, or an interaction-only specification. Such models are simpler, but can fail to represent the conditional means needed by the analysis. A joint model or a substantive-model-compatible imputation approach offers a different way to address model compatibility; neither makes the need to understand the target interaction disappear.

Diagnostics, limitations, and common pitfalls

Diagnostics should ask whether the imputed data preserve the interaction structure, not only whether the univariate distributions of imputed variables look plausible. Useful checks include comparing conditional summaries across levels of the interacting variable, inspecting the fitted imputation terms, and comparing observed and imputed values across relevant outcome and predictor strata. If an imputation model omits a lower-order term, look for systematic differences in those conditional summaries that the model cannot express.

  • Wrong reasoning: “The product term is in the imputation formula, so the interaction is preserved.” Correction: An interaction-only model may exclude group-specific offsets or trends. Check whether its lower-order terms allow it to reproduce the conditional relationship.
  • Wrong reasoning: “Strong hierarchy guarantees valid MICE imputations.” Correction: Hierarchy is a useful specification principle, not a guarantee of correct conditional distributions, compatibility among chained models, or adequate fit.
  • Wrong reasoning: “Copy the analysis terms unchanged into every imputation regression.” Correction: Derive or reason about each conditional model. When \(X\) is the response, the analysis term \(XZ\) may imply \(YZ\) in the conditional for \(X\), as the derivation showed.
  • Wrong reasoning: “If a lower-order coefficient is not statistically significant, its term can always be removed.” Correction: Removing a term can change the model’s structure and conditional predictions. A significance test alone does not establish that the reduced imputation model preserves the analysis relationship.

These considerations do not solve every challenge in interaction imputation. Sparse combinations of predictor values can make estimates unstable; poor functional-form choices can persist even when hierarchy is respected; and chained conditional models need not correspond to a single coherent joint distribution. Hierarchy helps avoid a particular class of omissions, but diagnostics and substantive judgment remain necessary.

1
Identify the analysis interaction.
Name the variables forming the product and note whether the analysis retains their lower-order terms.
2
Derive the relevant conditional.
For each incomplete variable, determine which outcome and predictor terms are needed in its imputation model; do not copy the analysis formula mechanically.
3
Check the hierarchy and fit.
Confirm that the conditional model can represent lower-order offsets and trends, then inspect its behavior across meaningful strata.

Check Your Understanding

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

  1. Under strong hierarchy, which terms accompany \(A B\)? Under weak hierarchy, what is required?
  2. In the worked normal example, what is \(E(X\mid Y=2,Z=0)\)?
  3. In that example, what is \(E(X\mid Y=0,Z=1)\), and which term in the combined conditional can represent the group offset?
  4. Why can an interaction-only imputation model fail even when it includes the product of the outcome and a predictor?
  5. Does including all lower-order terms establish that the MICE procedure is compatible and correctly specified? Explain briefly.

Solutions. 1. Strong hierarchy includes \(A\) and \(B\); weak hierarchy requires at least one of them. 2. For \(Z=0\), the mean is \(0.5Y\), so at \(Y=2\) it is \(1\). 3. The mean is \(0.6\), from \(0.3Y+0.6\) in the \(Z=1\) group; in the combined form \(0.5Y+0.6Z-0.2YZ\), the \(Z\) term represents the group offset. 4. The product is zero when either factor is zero, so by itself it cannot represent general lower-order trends or offsets. 5. No. Hierarchy is a useful safeguard, but correct conditional distributions, adequate fit, and compatibility among the chained models still require consideration.

Clinical Biostats