Why the Outcome and Analysis Covariates Belong in Predictor Imputation
Suppose the analysis is a logistic regression for a binary outcome \(Y\), but one or more predictors are missing. An imputation model for a missing predictor must preserve its relationship with the outcome as well as its relationships with the other analysis covariates. If the outcome is associated with the predictor after conditioning on those covariates, leaving the outcome out can weaken or distort the association in the completed data.
Here, \(Y\) is assumed observed for the individuals whose predictors are being imputed. Write \(X\) for a predictor that may be missing and \(Z\) for the vector of other analysis covariates. For clarity, begin with an additive logistic analysis model. This tutorial focuses on what that model implies for imputing \(X\); it does not imply that a single generic regression form is adequate for every predictor type.
The results below presume that the analysis model and the relevant conditional distributions are adequately specified, that there is enough observed information to estimate them, and that the missingness mechanism is ignorable under an appropriate missing-at-random assumption conditional on variables in the imputation model. There must also be sufficient overlap: the observed data need to provide information about the combinations of \(Y\) and \(Z\) for which \(X\) will be imputed. These conditions do not guarantee that an imputation model is correct; they explain the setting in which the model-based calculations are meaningful.
Deriving the Conditional Model
Assume the analysis model is
where \(\operatorname{expit}(a)=1/(1+\exp(-a))\). For any type of predictor \(X\), Bayes’ rule gives a useful general expression:
The proportionality is over \(x\): the right-hand side must be normalized over the possible values of \(X\) to form a probability distribution or density. This expression shows two ingredients. The distribution \(f(x\mid Z=z)\) describes the predictor among individuals with those covariates; the second factor is the logistic likelihood contribution of the observed outcome. Thus, conditioning on \(Y\) changes the distribution from which a missing \(X\) should be drawn.
Binary Predictors: An Exact Conditional Logit
When \(X\) is binary, let \(p_z=P(X=1\mid Z=z)\), and define \(\eta_1=\eta(1,z)\) and \(\eta_0=\eta(0,z)\). The posterior odds for \(X=1\) rather than \(X=0\), given \(Y=y,Z=z\), equal the prior odds given \(Z=z\) multiplied by the ratio of the two outcome likelihoods. Taking logarithms gives
For an additive logistic analysis, \(\eta_1-\eta_0=\beta\). The bracketed term still varies with \(z\) in general, because each \(\eta\) includes \(\gamma^\mathsf{T}z\). Therefore, a simple logistic regression of \(X\) on \(Y\) and \(Z\) with only linear main effects is not automatically the exact conditional model. The form needed also depends on the distribution of \(X\mid Z\) and on the way \(Z\) enters the outcome model.
Worked Example: Updating Binary-Predictor Odds After Observing the Outcome
Consider hypothetical data at a fixed covariate value \(Z=0\). Suppose \(P(X=1\mid Z=0)=0.30\), and the analysis model implies \(P(Y=1\mid X=0,Z=0)=0.10\) and \(P(Y=1\mid X=1,Z=0)=0.40\). Find the probability that \(X=1\) for an individual with \(Y=1,Z=0\), and then for one with \(Y=0,Z=0\).
The prior odds for \(X=1\) are \(0.30/(1-0.30)=0.4286\). For \(Y=1\), the likelihood ratio is \(0.40/0.10=4\). Thus the conditional odds are \(0.4286\times4=1.714\), and the conditional probability is
For \(Y=0\), the likelihood ratio is \((1-0.40)/(1-0.10)=0.60/0.90=0.6667\). The conditional odds are \(0.4286\times0.6667=0.2857\), giving
The outcome changes the imputation probability substantially in this example. The calculation uses the prior distribution of \(X\) and the outcome probabilities specified by the logistic analysis model; it does not treat the imputed value as a known fact.
The same derivation also explains why a conventional imputation regression may require more than adding \(Y\) as a predictor. For binary \(X\), the exact conditional logit contains a function of \(Z\) through the log-sum terms. If that function is not represented adequately, the conditional model may only approximate the distribution implied by the analysis model. A practical model can still be useful, but its adequacy is a modeling question, not a consequence of including the correct variable names.
Continuous Predictors: The Outcome Tilts the Distribution
For continuous \(X\), the general density expression gives the needed conditional distribution directly. Even if \(X\mid Z\) is normal, \(X\mid Y,Z\) is not generally normal: its density is multiplied by an outcome-likelihood factor that varies nonlinearly with \(x\). A linear regression imputation with normal residuals may therefore fail to represent the relevant conditional distribution, particularly when the outcome is strongly related to \(X\) or the covariate pattern is extreme.
Worked Example: Comparing Conditional Density Kernels
For illustration, suppose a continuous predictor has \(X\mid Z=0\sim N(0,1)\), and the outcome model is \(\operatorname{logit}P(Y=1\mid X,Z)= -2+0.8X+0.5Z\). Compare the unnormalized conditional density at \(x=1\) with that at \(x=0\), for \(Y=1,Z=0\) and for \(Y=0,Z=0\). These ratios illustrate the shape of the conditional distribution; they are not probabilities.
The normal prior-density ratio is \(f(1\mid Z=0)/f(0\mid Z=0)=\exp(-1/2)\approx0.6065\). At \(x=0\), the linear predictor is \(-2\); at \(x=1\), it is \(-1.2\). The corresponding outcome probabilities are approximately \(0.1192\) and \(0.2315\).
For \(Y=1\), the likelihood ratio is \(0.2315/0.1192\approx1.942\). Multiplying by the prior-density ratio gives \(0.6065\times1.942\approx1.178\). For \(Y=0\), the likelihood ratio is \((1-0.2315)/(1-0.1192)=0.7685/0.8808\approx0.8725\), so the density-kernel ratio is \(0.6065\times0.8725\approx0.5292\).
Thus, relative to \(x=0\), the observed event \(Y=1\) increases the conditional density kernel at \(x=1\), while \(Y=0\) decreases it. To obtain actual probabilities over intervals, or a normalized density, one must normalize the entire function over all possible \(x\); a ratio at two points alone is not a probability.
Other Analysis Covariates Must Be Preserved
Including \(Y\) does not make the other analysis covariates optional. The conditional model is for \(X\mid Y,Z\), so the imputation must account for the relevant \(Z\)-relationships too. If a covariate predicts both \(X\) and \(Y\), omitting it can distort the conditional relationship that the analysis is intended to estimate. The earlier material on mapping the analysis formula to imputation models gives the general motivation; here the important point is that the binary-outcome likelihood affects the form of the conditional predictor model.
Worked Example: The Same Outcome Gives Different Imputation Probabilities Across Covariates
Suppose that at \(Z=1\), \(P(X=1\mid Z=1)=0.60\), \(P(Y=1\mid X=0,Z=1)=0.20\), and \(P(Y=1\mid X=1,Z=1)=0.50\). Calculate the probability of \(X=1\) for individuals with \(Y=1,Z=1\), and with \(Y=0,Z=1\).
The prior odds are \(0.60/0.40=1.5\). For \(Y=1\), multiply by the likelihood ratio \(0.50/0.20=2.5\): the conditional odds are \(1.5\times2.5=3.75\), and
For \(Y=0\), multiply the prior odds by \((1-0.50)/(1-0.20)=0.50/0.80=0.625\). The conditional odds are \(1.5\times0.625=0.9375\), and
These probabilities differ from those at \(Z=0\) in the previous example. A predictor imputation that ignores \(Z\) would not represent this covariate-specific information.
Implementing and Checking the Imputation
In a MICE workflow, specify a conditional imputation model for each incomplete predictor. For a binary predictor, a logistic model for \(X\) can be a practical choice, but its predictors and functional form should be considered in light of the outcome model and the observed data. For a continuous predictor, use a method capable of representing the outcome-dependent conditional distribution when a normal linear model is not plausible. Include the binary outcome and the other analysis covariates used in the logistic regression. Do not mechanically assume that including them as simple main effects guarantees exact compatibility.
Useful checks include comparing observed and imputed predictor distributions within outcome and covariate groups, inspecting whether imputed probabilities are nearly always zero or one, and checking for sparse combinations or separation in a binary imputation model. For continuous predictors, compare conditional distributions and ranges, not only overall means and standard deviations. Trace and distribution diagnostics can reveal instability, but good mixing alone does not establish that the conditional model has the right form.
A common mistake is to reason, “The analysis is logistic, so I can impute \(X\) from \(Z\) alone and then fit the logistic regression.” That omits information in the observed outcome. The correction is to model \(X\mid Y,Z\), while checking that the chosen conditional form can represent the relevant relationships. Another mistake is to add \(Y\) as a single linear predictor and declare compatibility established. The exact binary-predictor derivation shows why that conclusion is not generally justified.
Compared with omitting \(Y\), outcome-inclusive imputation can preserve the predictor–outcome association and reduce distortion of the analysis relationship. Compared with specifying a fully joint model, MICE models the conditional distributions one at a time; this can be convenient for mixed predictor types, but the conditionals may not correspond to a single joint distribution. Neither approach removes the need to specify plausible relationships or diagnose poor fit. The exact conditional formula is a benchmark for understanding those relationships, not a guarantee that a simple off-the-shelf regression will reproduce them.
Check Your Understanding
Answer each question, then compare with the solutions below.
- If \(P(X=1\mid Z)=0.25\), \(P(Y=1\mid X=0,Z)=0.20\), and \(P(Y=1\mid X=1,Z)=0.50\), find \(P(X=1\mid Y=1,Z)\).
- Why can a normal model for \(X\mid Z\) fail to imply a normal model for \(X\mid Y,Z\) under logistic regression?
- For imputing \(X\), is including the binary outcome sufficient if another analysis covariate \(Z\) predicts both \(X\) and \(Y\)? Explain.
- What does a ratio of conditional density kernels at two values of a continuous predictor represent, and what does it not represent?
- Name one diagnostic sign that a binary predictor-imputation model may be unstable or poorly supported by the data.
Solutions. (1) The prior odds are \(0.25/0.75=0.3333\); the \(Y=1\) likelihood ratio is \(0.50/0.20=2.5\). The conditional odds are \(0.3333\times2.5=0.8333\), so the probability is \(0.8333/(1+0.8333)=0.4545\). (2) The logistic likelihood multiplies the prior density by a nonlinear function of \(X\), so the resulting conditional density is not generally normal. (3) No. The imputation should condition on the other analysis covariates as well, since omitting a relevant \(Z\) can distort predictor relationships. (4) It compares relative density contributions at those values before normalization; it is not itself a probability. (5) Examples include separation, nearly deterministic fitted probabilities, or sparse outcome–covariate combinations.