Tutorials › Multiple Imputation by Chained Equations (MICE) › Imputation With an Outcome by Predictor Interaction

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

Imputation With an Outcome by Predictor Interaction

Learn why imputing a predictor in an interaction model may require an outcome-by-other-predictor interaction, and how to specify and check that relationship.

Advanced 12 min read

What You'll Learn

  • Identify the outcome-dependent relationship induced by a predictor interaction in the analysis model.
  • Explain why a main-effects-only imputation model can erase relevant information.
  • Interpret an outcome-by-modifier term in a conditional imputation model.
  • Distinguish a useful compatible term structure from a guarantee of full compatibility.
  • Compare interaction terms with stratified imputation and recognize practical warning signs.

Why an Interaction Changes Predictor Imputation

When an analysis model includes an interaction, the association between its outcome and a predictor depends on another predictor. If that predictor is incomplete, imputing it requires attention to how the observed outcome informs its missing values. A model that uses the outcome only as a main effect may fail to preserve the varying association the analysis is designed to estimate.

Let \(Y\) be an outcome, \(X\) a predictor that may be missing, and \(Z\) another predictor. Suppose the substantive analysis uses a linear conditional mean with an \(X\)-by-\(Z\) interaction. The interaction means that the expected change in \(Y\) for a one-unit increase in \(X\) is allowed to vary with \(Z\). When imputing \(X\), the corresponding outcome association may therefore need to vary with \(Z\) as well.

Definition: An outcome-by-predictor interaction in an imputation model for \(X\) is a product term involving the outcome \(Y\) and a predictor \(Z\), such as \(Y Z\). It allows the conditional association between \(X\) and \(Y\) to differ across values of \(Z\). It is distinct from the analysis-model interaction \(X Z\), which describes how the association between \(Y\) and \(X\) varies with \(Z\).

The two product terms serve different roles. The analysis includes \(X Z\), because it models the outcome relationship. The imputation model for \(X\) may include \(Y Z\), because it models how outcome information relates to the missing predictor across levels of \(Z\). The latter is not obtained by mechanically copying the analysis formula; it reflects which conditional relationships must be represented when \(X\) is imputed.

From the Analysis Relationship to the Imputation Relationship

Write the analysis conditional mean as

$$ E(Y\mid X,Z)=\beta_0+\beta_X X+\beta_Z Z+\beta_{XZ}XZ. $$

At a fixed value \(Z=z\), the coefficient of \(X\) in this mean is \(\beta_X+\beta_{XZ}z\). Thus the outcome relationship with \(X\) differs across \(z\) whenever \(\beta_{XZ}\ne 0\). If \(X\) is missing, a model for its conditional distribution given \(Y\) and \(Z\) needs to be able to represent a corresponding variation in how \(Y\) informs \(X\).

A commonly useful term structure for a continuous \(X\) is

$$ E(X\mid Y,Z)=\gamma_0+\gamma_Y Y+\gamma_Z Z+\gamma_{YZ}YZ. $$

This is a conditional-mean specification, not a universal formula for the exact conditional distribution. Its key feature is that the association with \(Y\) is \(\gamma_Y+\gamma_{YZ}z\) at \(Z=z\). If \(\gamma_{YZ}=0\), the model restricts that association to be the same for every \(z\). Whether additional terms or a different distribution are needed depends on the substantive model, the distributions of the predictors, and the variable types. Including \(Y Z\) is an important structural consideration, but by itself it does not prove that the imputation model is fully compatible with the analysis model.

Key takeaway: If the analysis allows the outcome relationship with an incomplete predictor \(X\) to vary over another predictor \(Z\), consider allowing the outcome association in the imputation model for \(X\) to vary over \(Z\), typically by including \(Y Z\).

Worked Example: A Binary Modifier

Suppose \(Z\) is a binary indicator coded 0 or 1, and an analysis of a continuous outcome uses

$$ E(Y\mid X,Z)=10+2X+3Z+2XZ. $$

For \(Z=0\), the expected outcome is \(10+2X\), so its slope with respect to \(X\) is 2 outcome units per \(X\) unit. For \(Z=1\), the mean is \(13+4X\), and the slope is 4. The analysis therefore allows the \(Y\)-to-\(X\) relationship to differ between the two groups.

Suppose the imputation-model conditional mean for \(X\) is specified as

$$ E(X\mid Y,Z)=2+0.4Y-0.5Z+0.3YZ. $$

At \(Z=0\), this becomes \(E(X\mid Y,Z=0)=2+0.4Y\), with a slope of 0.4 \(X\) units per outcome unit. At \(Z=1\), it becomes \(1.5+0.7Y\), with a slope of 0.7 \(X\) units per outcome unit. For a case with \(Y=10\) and \(Z=1\), the fitted conditional mean is

$$ 2+0.4(10)-0.5(1)+0.3(10)(1)=8.5. $$

The \(Y Z\) term lets the imputation association with \(Y\) differ by group. These imputation coefficients are hypothetical and are not calculated from the analysis coefficients: reversing a regression does not generally leave its coefficients unchanged. The example illustrates the required flexibility, not a rule for converting one set of coefficients into the other.

Why the Product Term Matters

For binary \(Z\), the role of \(Y Z\) can be seen directly by writing a single regression that permits different outcome slopes in the two groups. Suppose the imputation conditional mean is linear in \(Y\) within each group, with intercept \(a_0\) and slope \(a_1\) when \(Z=0\), and intercept \(b_0\) and slope \(b_1\) when \(Z=1\). The expression

$$ a_0+a_1Y+(b_0-a_0)Z+(b_1-a_1)YZ $$

equals \(a_0+a_1Y\) for \(Z=0\). For \(Z=1\), it equals

$$ a_0+a_1Y+(b_0-a_0)+(b_1-a_1)Y=b_0+b_1Y. $$

Thus, with binary \(Z\), the main effect of \(Z\) permits the group intercepts to differ, while \(Y Z\) permits the slopes of \(X\) on \(Y\) to differ. Without the product term, the model forces \(a_1=b_1\). This is precisely the restriction that may conflict with an analysis whose \(X\) association varies by group.

Worked Example: What a Main-Effects-Only Model Restricts

Suppose the fitted imputation means in two hypothetical groups are \(E(X\mid Y,Z=0)=1+0.2Y\) and \(E(X\mid Y,Z=1)=3+0.6Y\). Consider an observed outcome value \(Y=5\).

In group 0, the conditional mean is \(1+0.2(5)=2.0\) \(X\) units. In group 1, it is \(3+0.6(5)=6.0\) \(X\) units. The outcome slope differs by \(0.6-0.2=0.4\) \(X\) units per outcome unit.

A model with only a main effect of \(Y\) and a main effect of \(Z\) can represent different intercepts, but its \(Y\) slope must be common across groups. For example, a shared slope of 0.2 would predict a group-1 mean of \(3+0.2(5)=4.0\), not 6.0. A shared slope of 0.6 would predict a group-0 mean of \(1+0.6(5)=4.0\), not 2.0. A \(Y Z\) term allows both group-specific slopes to be represented.

Specification, Assumptions, and Alternatives

The term structure must match the variable types and the intended conditional model. The examples above use a continuous \(X\) and a conditional mean linear in \(Y\) and \(Z\); they do not establish that a normal linear imputation model is appropriate for every \(X\). A binary \(X\), for example, needs a suitable categorical imputation model, with its linear predictor able to represent the outcome-by-\(Z\) relationship. For a continuous \(Z\), the interaction is \(Y Z\), but a straight-line change across \(Z\) may be inadequate if the substantive relationship is more complex.

As with other MICE conditional models, the imputation specification also needs to be supported by the data: relevant predictors should be available, the chosen functional form should be plausible, and the model must be estimable in the observed cases. Standard missing-data assumptions and appropriate handling of the missingness process remain important. A correctly placed interaction term cannot compensate for an unsupported missingness assumption, severe model misspecification, or too little information in a subgroup.

There are three practical approaches to representing the varying association:

  • Use an explicit product term. Include \(Y Z\) in the conditional model for \(X\), alongside suitable main effects. This is compact and can be used for continuous or categorical modifiers with appropriate coding.
  • Fit group-specific relationships. For a binary \(Z\), separate conditional models by group can allow different \(Y\) slopes. This uses more parameters and may be unstable when few observed \(X\) values occur in one group.
  • Use a model tailored to the substantive model. This can address compatibility more directly when the simple conditional-mean form is inadequate, but it requires a carefully specified model and is not guaranteed merely by adding one product term.

A main-effects-only conditional model is the simpler alternative, but it imposes a shared outcome slope. It is appropriate only when that restriction is defensible for the imputation target; it should not be chosen just because it is easier to fit. Conversely, adding every possible product term can create sparse cells, unstable estimates, or an overfit model. Preserve the interaction needed by the analysis while checking whether the available data can support it.

Worked Example: Checking Group-Specific Support

Imagine a hypothetical data set in which \(Z\) is binary and 40 cases have observed \(X\) and \(Y\): 32 in group \(Z=0\) and 8 in group \(Z=1\). The proposed imputation model includes \(Y\), \(Z\), and \(Y Z\). The product term allows separate outcome slopes, but the group-1 slope is informed by only 8 observed \(X\) values.

The specification is algebraically capable of representing different slopes; that does not mean the group-1 slope is estimated precisely. A practical check is to inspect the observed \(X\)-versus-\(Y\) relationship within each group, assess whether the group-1 values cover a useful range of \(Y\), and examine whether fitted values or estimates are dominated by a few observations. If the group-1 data provide little information, the interaction estimate and imputations may be unstable. The response is not automatically to delete the term, since doing so imposes equal slopes; instead, consider whether a more parsimonious, regularized, or otherwise suitable modeling strategy is justified by the substantive goal and data.

Diagnostics and Common Mistakes

Diagnostics should ask whether the outcome relationship for the incomplete predictor varies across the modifier as the model permits, and whether the data support that variation. Useful checks include comparing observed \(X\)-versus-\(Y\) patterns across levels or ranges of \(Z\), checking conditional predictions for implausible values, and inspecting convergence and stability of the chained-equation procedure. For a binary modifier, group-specific plots or summaries can reveal a slope difference that a pooled main-effects model hides. These checks do not prove compatibility, but they can expose obvious restrictions or failures.

  • Mistake: “The outcome is included, so the imputation model is adequate.” Including \(Y\) only as a main effect forces the same \(Y\)-to-\(X\) association at all \(Z\). If that association needs to vary, include the corresponding interaction or use another defensible specification.
  • Mistake: “Copy \(X Z\) directly into the model for imputing \(X\).” Since \(X\) is the target being imputed, \(X Z\) is not the outcome-dependent term that expresses how \(Y\) informs \(X\). The relevant term in the illustrated conditional model is \(Y Z\).
  • Mistake: “Adding \(Y Z\) guarantees compatibility.” The term allows one important varying association, but the conditional distribution, other required terms, and assumptions must still be appropriate.
  • Mistake: “A non-significant interaction can be omitted without consequence.” A test in the observed cases may have low power, particularly with sparse groups. Whether to represent a substantive interaction is a modeling decision, not a conclusion that should rest only on a significance test.

The central limitation is that the needed conditional distribution may be more complicated than a linear mean with one product term. The exact requirements depend on the full joint structure and on the outcome and predictor types. Here, the goal is to identify the outcome-dependent relationship to preserve; deriving a particular full conditional distribution is a separate step.

Key takeaway: An analysis interaction \(X Z\) means the relationship between \(Y\) and \(X\) may vary with \(Z\). When imputing \(X\), a main-effects-only relationship with \(Y\) can erase that variation; an outcome-by-modifier term such as \(Y Z\) allows it to be represented.

Check Your Understanding

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

  1. An analysis includes \(X Z\). In an imputation model for \(X\), what role does \(Y Z\) play?
  2. For binary \(Z\), a conditional mean for \(X\) has coefficients \(\gamma_Y=0.5\) and \(\gamma_{YZ}=-0.2\). What is the slope on \(Y\) when \(Z=0\), and when \(Z=1\)?
  3. Why can a model with \(Y\) and \(Z\) main effects fail to represent different \(Y\)-to-\(X\) slopes across groups?
  4. Does including \(Y Z\) alone prove that the imputation and analysis models are fully compatible? Explain.

Solutions. (1) It allows the association between \(X\) and the observed outcome \(Y\) to vary with \(Z\), which may be needed when the analysis includes \(X Z\). (2) The slope is \(\gamma_Y+\gamma_{YZ}Z\), so it is \(0.5\) \(X\) units per \(Y\) unit for \(Z=0\), and \(0.5-0.2=0.3\) for \(Z=1\). (3) With only main effects, the coefficient of \(Y\) is common across groups; the model permits different intercepts but not different slopes. (4) No. The term supplies a needed form of flexibility, but the full conditional distribution, other terms, data support, and assumptions still matter.

Clinical Biostats