Tutorials › Regression Analysis (Undergraduate) › Including the Outcome When Imputing Predictors

Missing Data in Regression Analyses · Tutorial 858 of 991

Including the Outcome When Imputing Predictors

See how including the observed outcome helps preserve predictor–outcome relationships when imputing missing predictors, and why the choice does not by itself solve every missing-data problem.

Intermediate 10 min read

What You'll Learn

  • Explain why the observed outcome can help predict a missing regression predictor
  • Distinguish the analysis model from the imputation model
  • Describe the assumptions under which outcome-inclusive imputation is appropriate
  • Calculate and compare regression slopes after two illustrative imputations
  • Explain why a conditional mean prediction is not the same as a stochastic imputation
  • Recognize what including the outcome does not establish or fix

Why the Outcome Helps Impute a Predictor

Suppose a regression analysis studies how a predictor \(X\) is associated with an outcome \(Y\), but some values of \(X\) are missing while the corresponding outcomes are observed. Those observed outcomes contain information about what the missing predictor values might have been. An imputation model for \(X\) that ignores \(Y\) can discard that information, making the completed data less able to represent the association the analysis is intended to estimate.

This is a design principle for imputation, not a claim that an outcome causes a predictor or that the outcome must be used to predict \(X\) in practice. The imputation model describes the distribution of the missing predictor given observed information. The analysis model describes the relationship being studied, such as a regression of \(Y\) on \(X\). They serve different purposes.

Definition: An imputation model for a missing predictor specifies how that predictor is distributed given information observed for the record. When \(X\) is incomplete and \(Y\) is observed, a model for \(X\) will generally include \(Y\), the other predictors in the analysis, and relevant auxiliary variables. For example, its target may be the conditional distribution \(P(X\mid Y,Z)\), where \(Z\) denotes other observed information.

The recommendation is most directly relevant when the outcome is observed for records with missing predictors. Under a missing at random (MAR) assumption, the chance that \(X\) is missing may depend on observed variables, including \(Y\), but not on the unseen value of \(X\) after conditioning on those observed variables. Correctly specifying the conditional imputation model is also important. Including \(Y\) supports an appropriate imputation under such conditions; it does not prove MAR, guarantee a correct model, or solve missing-not-at-random problems.

How Omitting the Outcome Can Lose Information

Imagine that people with higher outcome values also tend to have higher predictor values. If \(Y\) is available for a record but excluded from the imputation model for \(X\), the prediction for that record cannot respond to its particular outcome value. It may instead be based on an overall average or on other variables alone. This can blur the predictor–outcome relationship, especially when many missing predictor values are replaced by values that do not reflect the corresponding outcomes.

A simple conditional-mean argument makes the information loss precise. Suppose, for illustration, that the conditional mean of \(X\) given \(Y\) is linear:

$$ X = \gamma_0 + \gamma_1Y + \varepsilon,\qquad E(\varepsilon\mid Y)=0. $$

Then the best squared-error prediction of \(X\) using \(Y\) is \(\gamma_0+\gamma_1Y\). If \(\gamma_1\ne 0\), this prediction varies with the outcome. A prediction that excludes \(Y\) cannot capture that variation. In this model, the law of total variance gives:

$$ \operatorname{Var}(X) = \operatorname{Var}\{E(X\mid Y)\} + E\{\operatorname{Var}(X\mid Y)\} = \gamma_1^2\operatorname{Var}(Y)+\operatorname{Var}(\varepsilon). $$

Thus, the part \(\gamma_1^2\operatorname{Var}(Y)\) of the variation in \(X\) is associated with differences in \(Y\). An imputation model that omits \(Y\) cannot use this outcome-related information to distinguish records. This does not prove that every omission will reduce a particular fitted coefficient by a fixed amount: the effect depends on the data, the missingness pattern, the other imputation variables, and the model forms.

Worked Example: An Outcome-Specific Prediction

Suppose observed records support the illustrative conditional mean model \(E(X\mid Y)=1+0.5Y\). For one record, \(Y=10\) is observed but \(X\) is missing. Compare the conditional-mean prediction using the outcome with a prediction that ignores the outcome and uses the observed-predictor mean, 3.5.

Including \(Y\). Substitute the observed outcome into the conditional mean:

$$ \widehat{X}=1+0.5(10)=6. $$

Excluding \(Y\). The outcome-blind prediction is \(3.5\), regardless of whether this record has \(Y=10\) or a much smaller outcome.

The value 6 is more tailored to this record under the stated model. It is still a prediction, not a known value of \(X\), and the assumed conditional mean model must be suitable for the data. In multiple imputation, a conditional prediction alone is not enough: imputation must also represent uncertainty and residual variation, as discussed below.

Worked Comparison: When Omitting the Outcome Weakens a Slope

The following hypothetical data make the loss visible. Assume a complete underlying data set has \(Y=X\) for six records. A grouping variable \(Z\) is also observed. One value of \(X\) is missing in group A; the corresponding \(Y\) remains observed.

RecordGroup \(Z\)Complete \(X\)Observed \(Y\)
1A00
2A22
3A4 (missing)4
4B66
5B88
6B1010

Worked Example: Comparing Imputation With and Without \(Y\)

First, if the missing value is imputed using only group A, the observed \(X\) values in that group are 0 and 2. Their mean is:

$$ \bar{x}_{A}=\frac{0+2}{2}=1. $$

So an imputation model using \(Z\) but excluding \(Y\) fills the missing \(X\) with 1. The completed predictor values are \(0,2,1,6,8,10\). The outcome mean is \(\bar{y}=5\), and the completed predictor mean is \(\bar{x}=27/6=4.5\). For the regression of \(Y\) on \(X\), the least-squares slope is \(S_{xy}/S_{xx}\), where \(S_{xy}=\sum_i(x_i-\bar{x})(y_i-\bar{y})\) and \(S_{xx}=\sum_i(x_i-\bar{x})^2\). The sums are:

$$ \begin{aligned} S_{xy} &=(-4.5)(-5)+(-2.5)(-3)+(-3.5)(-1)\\ &\quad +(1.5)(1)+(3.5)(3)+(5.5)(5)=73,\\ S_{xx} &=(-4.5)^2+(-2.5)^2+(-3.5)^2+(1.5)^2+(3.5)^2+(5.5)^2=83.5,\\ b_1&=\frac{S_{xy}}{S_{xx}}=\frac{73}{83.5}=0.8743. \end{aligned} $$

Now use the outcome as well. In this deliberately simple example, the observed records follow \(X=Y\) exactly, so a suitable model using \(Y\) predicts \(X=4\) for the missing record. The completed predictor values are then \(0,2,4,6,8,10\). Because \(X=Y\) for all six records, the fitted regression slope is \(1\). The complete-data slope is also \(1\).

Here, imputing from group alone replaces the missing value 4 with 1 and produces a slope of about 0.874 rather than 1. The example illustrates how omitting an observed outcome can weaken the estimated association. Its exact numbers rely on an intentionally perfect relationship and are not a general formula for the size or direction of the effect.

From a Prediction to an Imputation Model

A conditional mean such as \(E(X\mid Y,Z)\) summarizes the expected predictor value for records with particular observed information. Replacing every missing value by that mean is a deterministic single imputation. It does not represent the fact that several different \(X\) values may be plausible for records with the same \(Y\) and \(Z\), nor the uncertainty in the estimated conditional model. In multiple imputation, values are repeatedly drawn from an appropriate conditional distribution, including its residual variation and, where relevant, uncertainty in its estimated parameters.

The purpose here is not to specify every distributional choice. For a continuous predictor, the conditional model might be a regression of \(X\) on \(Y\) and other observed variables, with an error distribution that reflects variation around its predicted mean. The critical point for this tutorial is that the observed outcome belongs among the predictors of the missing \(X\) when appropriate to the analysis and data.

Worked Example: Using Outcome and Another Predictor

Suppose an illustrative model for a missing continuous predictor is \(E(X\mid Y,Z)=2+0.4Y+1.5Z\), where \(Z\) is an observed binary indicator coded 0 or 1. For a record with \(Y=5\) and \(Z=1\), calculate the conditional mean prediction. Then compare it with the prediction from a model that leaves \(Y\) out but retains \(Z\), specified here as \(E(X\mid Z)=3+1.5Z\).

Model including the outcome:

$$ 2+0.4(5)+1.5(1)=2+2+1.5=5.5. $$

Model excluding the outcome:

$$ 3+1.5(1)=4.5. $$

The two predictions differ because the first uses this record’s outcome value. These equations are illustrative assumptions, not fitted results from real data. In an actual analysis, the imputation model should be chosen and checked for its relevance to the variables, sample, and analysis model. A stochastic imputation would draw a plausible value around the conditional distribution rather than treating 5.5 as certainly correct.

Assumptions, Boundaries, and Common Mistakes

Including \(Y\) in an imputation model for missing \(X\) is generally important when \(Y\) is observed, but it is not a standalone guarantee of valid inference. The imputation model must include relevant information, use reasonable functional forms, and represent the conditional distribution adequately. If the analysis includes important variables or relationships that the imputation model fails to represent, the completed data may still distort the analysis. Missingness assumptions also matter: including observed \(Y\) can help account for missingness related to \(Y\), but cannot identify the distribution of missing \(X\) when missingness depends on its unseen value in ways not explained by observed information.

  • Mistake: “The outcome is not a predictor, so it must be excluded.” The outcome in the analysis model is not automatically excluded from an imputation model. The imputation model has a different purpose: it uses observed information to represent missing values. When \(Y\) is observed, it can help predict \(X\).
  • Mistake: “Including the outcome proves the missingness is MAR.” It does not. MAR is an assumption about the missingness process conditional on observed information. It cannot generally be verified just by adding \(Y\) to a model.
  • Mistake: “The conditional mean is the missing value.” A conditional mean is an average prediction. Individual values vary around it. In multiple imputation, plausible draws should reflect that variation and uncertainty.
  • Mistake: “The slope must always move toward zero if the outcome is omitted.” The worked comparison shows weakening in one constructed setting, not a universal direction. The impact depends on the data structure and imputation model.

The practical takeaway is to think about the information needed to preserve the analysis relationship. When a predictor is missing but the outcome is observed, an imputation model for that predictor will generally include the outcome, along with the other analysis predictors and relevant auxiliary information. This makes the missing-value model responsive to the observed outcome without confusing prediction with certainty or claiming that missing-data assumptions have been proven.

Check Your Understanding

Answer each question using the distinction between the analysis model and the imputation model.

  1. A predictor \(X\) is missing for some records, but \(Y\) is observed. Why can \(Y\) help impute \(X\)?
  2. In the worked comparison, what predictor value resulted from using group A alone, and what value was predicted when the outcome relationship was used?
  3. Why is a conditional-mean prediction not, by itself, a complete multiple imputation?
  4. Does including the outcome in the imputation model establish that missingness is MAR? Explain briefly.
  5. Is it guaranteed that excluding \(Y\) will reduce a regression slope? Why or why not?