Why an Interaction Changes Predictor Imputation
Suppose an analysis relates a continuous outcome \(Y\) to two continuous predictors \(X\) and \(Z\), and includes their product \(XZ\). The conditional mean of \(Y\) then depends on \(X\) differently at different values of \(Z\), and vice versa. Imputing a missing \(X\) or \(Z\) without representing that dependence can make the completed data inconsistent with the analysis relationship.
The central task is to specify each predictor’s conditional imputation relationship with the interaction in mind. The interaction is not an additional observed variable independent of \(X\) and \(Z\): it is calculated from them. When either predictor is imputed, its product with the other predictor must be recalculated in that imputed data set.
The earlier material on interactions as part of the analysis model establishes why the product belongs in the analysis formula. Here the focus is the conditional distribution needed to impute a predictor while retaining that analysis model.
A Continuous-Outcome Model and Its Conditional Imputation Distribution
For a derivation, assume the analysis model is a normal linear regression with a product term:
This states that the conditional mean is linear in \(x\), \(z\), and \(xz\), and that the conditional variance is the same \(\sigma^2\) at all predictor values. To derive an imputation distribution for \(X\), also assume a predictor model of the form
These are modelling assumptions, not automatic properties of the data. The derivation uses a normal conditional distribution for \(X\mid Z\) and a normal outcome model with constant variance. The resulting conditional distribution of \(X\mid Y,Z\) follows from Bayes’ rule. In practice, parameter uncertainty must also be represented across imputations for proper multiple imputation; the calculation below first treats model parameters as fixed to show the conditional distribution.
The interaction changes the slope of the outcome mean with respect to \(X\) from a constant \(\beta_1\) to \(c(z)=\beta_1+\beta_3z\). Consequently, both the amount of outcome information about \(X\) and the conditional variance of \(X\mid Y,Z\) can vary with \(z\). The conditional mean also need not be a simple linear function of \(y\) and \(z\), because \(V_X(z)\) is a function of \(z\).
Why the Conditional Distribution Has This Form
For fixed \(y\) and \(z\), the outcome model can be written as \(Y=d(z)+c(z)X+\epsilon\), where \(\epsilon\sim N(0,\sigma^2)\). Bayes’ rule says that the conditional density of \(X\) given \(y,z\) is proportional to the product of the outcome likelihood and the predictor density:
To identify this as a normal density in \(x\), collect the terms involving \(x^2\) and \(x\) in the exponent. The coefficient of \(x^2\), before the common factor \(-1/2\), is \(1/\tau_X^2+c(z)^2/\sigma^2\). The coefficient of \(x\) is twice \(x\) times the quantity \((a_0+a_1z)/\tau_X^2+c(z)\{y-d(z)\}/\sigma^2\). Completing the square therefore gives precision \(1/V_X(z)\) and mean \(m_X(y,z)\) as stated. Terms that do not involve \(x\) affect only the normalizing constant, not the conditional mean or variance.
This calculation also makes the assumptions visible: the likelihood must have the stated normal form, and the distribution \(X\mid Z\) must be the stated normal distribution. If those assumptions are unsuitable, this particular formula is not justified merely because the analysis includes an interaction.
Worked Example: Imputing \(X\) When \(Z\) Is Observed
Consider hypothetical data with a missing value of \(X\), observed \(Z=1\), and observed outcome \(Y=5.6\). Suppose the assumed predictor model is \(X\mid Z=z\sim N(1+0.5z,4)\), and the analysis model is \(Y\mid X,Z\sim N(2+1.2X-0.4Z+0.8XZ,1)\). Assume these normal models and their variances are appropriate for this illustration.
At \(z=1\), the prior conditional mean of \(X\) is \(1+0.5(1)=1.5\), and its variance is \(4\). The outcome mean’s intercept as a function of \(X\) is \(d(1)=2-0.4(1)=1.6\), while its slope with respect to \(X\) is \(c(1)=1.2+0.8(1)=2.0\). Thus \(y-d(1)=5.6-1.6=4.0\).
The conditional variance is
The conditional mean is
Under these assumed models and fixed parameters, the conditional distribution is \(X\mid Y=5.6,Z=1\sim N(1.971,0.2353)\). Its standard deviation is \(\sqrt{0.2353}=0.4851\). A multiple-imputation procedure draws plausible values from the conditional distribution, rather than filling in every missing value with its mean.
Imputing the Other Predictor and Running the Chain
The same reasoning applies when \(Z\) is missing. For a compatible specification, suppose \(Z\mid X=x\sim N(g_0+g_1x,\tau_Z^2)\). Under the analysis model above, the outcome mean as a function of \(z\) has intercept \(r(x)=\beta_0+\beta_1x\) and slope \(q(x)=\beta_2+\beta_3x\). The conditional distribution is then
The predictor distributions \(X\mid Z\) and \(Z\mid X\) must themselves be consistent with a joint model if exact compatibility is claimed. For example, two arbitrary regression equations, each fitted separately, need not be the conditional distributions of any single joint distribution. This is one reason a convenient fully conditional specification is not automatically a compatible joint model.
Worked Example: Imputing \(Z\) From the Outcome and \(X\)
In a separate hypothetical setting, let \(Z\mid X=x\sim N(0.2+0.3x,2.25)\). Use the same analysis equation as above and consider a record with \(X=1\) and \(Y=4\), but missing \(Z\). For this calculation, assume the stated normal conditional predictor model and analysis model apply.
At \(x=1\), the predictor-model mean is \(0.2+0.3(1)=0.5\). The outcome mean’s intercept as a function of \(Z\) is \(r(1)=2+1.2(1)=3.2\), and its slope is \(q(1)=-0.4+0.8(1)=0.4\). Thus \(y-r(1)=4-3.2=0.8\).
The conditional variance and mean are
The resulting conditional distribution is \(Z\mid Y=4,X=1\sim N(0.897,1.654)\), with standard deviation \(\sqrt{1.654}=1.286\). The relatively large conditional variance is not an error: with the specified parameters, the outcome changes only modestly as \(Z\) changes, so it provides limited information about \(Z\).
In chained equations, the conditional imputation steps are applied in turn to the predictors with missing values, using current values of the other variables. The observed outcome should be included when it is part of the analysis relationship and is observed for that record. If \(X\) or \(Z\) is imputed, calculate \(XZ\) from the current values of both variables before using the completed data for analysis. The product is deterministic given \(X\) and \(Z\); it should not be imputed as though it were a separate, unconstrained variable.
Worked Example: Updating the Product After an Imputation
Return to the hypothetical record in the first worked example, for which \(Z=1\) and \(X\) is missing. Suppose one imputation draws \(X=2.20\) from its conditional distribution. The product used in the analysis data set is calculated from that draw:
The analysis-model conditional mean for this completed record is
The observed outcome was \(5.6\), so the draw gives a residual of \(5.6-6.00=-0.40\), a plausible deviation under the assumed residual standard deviation of \(1\). This is one possible imputed value, not a prediction that \(X\) must equal \(2.20\). A different imputation draw generally gives a different \(X\), product, and fitted conditional mean.
Practical Choices, Diagnostics, and Limitations
The derived distributions show why a routine linear regression of \(X\) on \(Y\) and \(Z\) may be inadequate. It may omit the \(Y\)-by-\(Z\) dependence in the conditional mean, and it generally does not represent the variance \(V_X(z)\), which changes with \(z\). Simply adding \(Y Z\) to an ordinary regression can capture some mean structure, but does not, by itself, reproduce the derived conditional variance or guarantee that the conditional models for \(X\) and \(Z\) come from a common joint distribution.
When exact compatibility under the stated assumptions is important, a principled approach is to construct the conditional distributions from an explicit joint predictor model and the analysis model, as in the derivation. Specialized substantive-model-compatible imputation methods can target such conditionals. In routine MICE, a simpler conditional regression may be used as an approximation, but its adequacy should be justified rather than inferred from the presence of an interaction term alone.
The normal derivation is limited to continuous predictors and the stated normal models. It does not prescribe a conditional model for categorical predictors, nonlinear terms, or an outcome model with a different distribution. Those cases require suitable conditional distributions and are not resolved by applying this formula mechanically. Likewise, correct conditional models do not by themselves establish validity if the missingness assumptions or other imputation assumptions fail.
Useful checks include examining whether the assumed predictor distributions are plausible, whether conditional residual patterns suggest nonlinearity or changing variance, whether imputed values are plausible and within sensible ranges, and whether chains mix and stabilize. Compare observed and imputed distributions, including relevant relationships with \(Y\) and the other predictor. Such checks can reveal problems, but no diagnostic plot proves compatibility or verifies the missingness assumptions.
Check Your Understanding
Answer each question, then compare with the solutions below.
- In the analysis mean \(\beta_0+\beta_1X+\beta_2Z+\beta_3XZ\), what is the slope with respect to \(X\) when \(Z=z\)?
- Using the first worked example’s parameters, calculate the conditional variance of \(X\) when \(Z=-1\). Is it the same as when \(Z=1\)?
- For the same parameters and \(Y=5.6,Z=-1\), calculate the conditional mean of \(X\mid Y,Z\).
- If \(Z\) is observed as \(1\) and an imputation draw gives \(X=1.7\), what product should enter the analysis data set?
- Why does including \(YZ\) as a predictor in a linear imputation regression not automatically establish compatibility?
Solutions. (1) The slope is \(\beta_1+\beta_3z\), because the terms involving \(X\) are \((\beta_1+\beta_3z)X\). (2) At \(z=-1\), \(c(-1)=1.2-0.8=0.4\), so \(V_X(-1)=(1/4+0.4^2/1)^{-1}=(0.25+0.16)^{-1}=2.439\), which differs from \(V_X(1)=0.2353\). (3) The prior mean is \(1+0.5(-1)=0.5\), and \(d(-1)=2-0.4(-1)=2.4\). Therefore \(m_X=2.439\{0.5/4+0.4(5.6-2.4)\}=2.439(0.125+1.280)=3.427\). (4) Calculate, rather than separately impute, the product: \(XZ=(1.7)(1)=1.7\). (5) A \(YZ\) term may represent part of the conditional mean, but the exact conditional distribution also has an interaction-dependent variance and must be consistent with a predictor joint model. A term in a regression alone does not establish those properties.