Tutorials › Multiple Imputation by Chained Equations (MICE) › Deriving Predictive Draws Under The Normal Linear Model

Imputation Models by Variable Type · Tutorial 153 of 497

Deriving Predictive Draws Under The Normal Linear Model

Learn how regression-parameter uncertainty and residual uncertainty combine to produce predictive draws for a missing continuous value.

Intermediate 11 min read

What You'll Learn

  • State the normal linear regression assumptions used to predict a missing continuous value.
  • Derive the uncertainty in a fitted conditional mean at a specified predictor value.
  • Separate uncertainty in that conditional mean from residual variation in a new outcome.
  • Obtain the Student t predictive distribution when the residual variance is unknown.
  • Calculate a predictive distribution and an illustrative predictive draw from hypothetical data.
  • Recognize when a plug-in prediction or an unsuitable regression model gives misleading imputations.

Why a Prediction Needs More Than a Fitted Mean

In a chained-equations update for a continuous variable, regression predictors are held at their current values while the variable is modeled using cases with observed outcomes. For a case whose outcome is missing, the fitted regression gives a conditional mean. That mean is not, by itself, a predictive draw: it does not account for uncertainty in the estimated regression coefficients or for the fact that individual outcomes vary around the regression mean.

This tutorial derives how those two sources of variation enter the predictive distribution. The focus is the normal linear model. It does not establish that this model is appropriate for every continuous variable; the model’s form, predictor set, and assumptions still require substantive and diagnostic consideration.

Definition: Let \(Y\) be the continuous outcome and let \(\mathbf{x}\) be a \(p\)-component predictor vector, including an intercept if the model has one. Under the normal linear regression model, \(Y\mid\mathbf{x},\boldsymbol{\beta},\sigma^2\sim N(\mathbf{x}^{T}\boldsymbol{\beta},\sigma^2)\). Here \(\boldsymbol{\beta}\) is the coefficient vector and \(\sigma^2\) is the residual variance. A predictive distribution for a missing outcome describes its uncertainty after accounting for the fitted data and the specified model.

Model and Assumptions

Write the \(n\) observed outcomes as the vector \(\mathbf{y}\), and arrange their predictor vectors as the rows of the \(n\times p\) design matrix \(\mathbf{X}\). The model is

$$ \mathbf{y}=\mathbf{X}\boldsymbol{\beta}+\boldsymbol{\varepsilon}, \qquad \boldsymbol{\varepsilon}\sim N(\mathbf{0},\sigma^2\mathbf{I}_n). $$

Thus, conditional on the predictors, errors have mean zero, common variance \(\sigma^2\), and are independent and normally distributed. The design matrix must have full column rank, so \(n>p\) is needed to estimate the residual variance using residual degrees of freedom. The model also assumes that the conditional mean is linear in the included predictors. These are assumptions about the outcome model, not guarantees that the model is suitable for a particular data set.

For a case with missing outcome, denote its predictor vector by \(\mathbf{x}_0\). The target is \(Y_0\), whose conditional mean at given coefficients is \(\mathbf{x}_0^T\boldsymbol{\beta}\). Under least squares, \(\hat{\boldsymbol{\beta}}=(\mathbf{X}^T\mathbf{X})^{-1}\mathbf{X}^T\mathbf{y}\), and the residual variance estimate is \(s^2=\mathrm{RSS}/(n-p)\), where \(\mathrm{RSS}=(\mathbf{y}-\mathbf{X}\hat{\boldsymbol{\beta}})^T(\mathbf{y}-\mathbf{X}\hat{\boldsymbol{\beta}})\).

Separating the Two Sources of Predictive Variation

First suppose \(\sigma^2\) is known and coefficients are uncertain under the normal linear model. The least-squares coefficient estimator has covariance matrix \(\sigma^2(\mathbf{X}^T\mathbf{X})^{-1}\). Consequently, the fitted conditional mean at \(\mathbf{x}_0\) has variance

$$ \operatorname{Var}(\mathbf{x}_0^T\hat{\boldsymbol{\beta}}) =\sigma^2 h_0, \qquad h_0=\mathbf{x}_0^T(\mathbf{X}^T\mathbf{X})^{-1}\mathbf{x}_0. $$

The quantity \(h_0\) measures how uncertain the fitted mean is at this predictor vector. It depends on the design and the location of \(\mathbf{x}_0\), not on the outcome’s residual variance alone. Even if the conditional mean were known, a new outcome would vary around it with variance \(\sigma^2\). The two components therefore give

$$ \operatorname{Var}(Y_0-\mathbf{x}_0^T\hat{\boldsymbol{\beta}}) =\underbrace{\sigma^2 h_0}_{\text{coefficient uncertainty}} +\underbrace{\sigma^2}_{\text{residual variation}} =\sigma^2(1+h_0). $$

The residual term is not optional when predicting an individual outcome. Omitting it gives uncertainty for the estimated conditional mean, not for a new outcome around that mean.

Worked Example: Known Residual Variance

Suppose a hypothetical regression has \(h_0=0.225\) at a missing case’s predictor vector, and the model stipulates a known residual variance of \(\sigma^2=0.64\) squared outcome units. Calculate the two variance contributions and the predictive standard deviation.

The coefficient contribution is \(\sigma^2h_0=0.64(0.225)=0.144\) squared outcome units. Residual variation contributes \(0.64\) squared outcome units. Thus the predictive variance is \(0.144+0.64=0.784\) squared outcome units, and the predictive standard deviation is \(\sqrt{0.784}=0.8854\) outcome units.

The plug-in mean alone would omit the residual contribution and report a standard error of \(\sqrt{0.144}=0.3795\) outcome units for the estimated mean. That is not the appropriate predictive standard deviation for an individual missing outcome.

Deriving the Predictive Distribution When Variance Is Unknown

In practice, \(\sigma^2\) is usually unknown. To obtain a predictive distribution, one standard derivation uses the normal linear model with the noninformative prior \(p(\boldsymbol{\beta},\sigma^2)\propto1/\sigma^2\). With a full-rank \(\mathbf{X}\), \(n>p\), and \(\mathrm{RSS}>0\), the posterior distributions are

$$ \boldsymbol{\beta}\mid\sigma^2,\mathbf{y} \sim N\!\left(\hat{\boldsymbol{\beta}},\sigma^2(\mathbf{X}^T\mathbf{X})^{-1}\right), \qquad \frac{(n-p)s^2}{\sigma^2}\mid\mathbf{y}\sim\chi^2_{n-p}. $$

Given \(\sigma^2\), a new outcome has residual variance \(\sigma^2\), while uncertainty in \(\mathbf{x}_0^T\boldsymbol{\beta}\) contributes \(\sigma^2h_0\). Integrating over the coefficient distribution first therefore gives

$$ Y_0\mid\sigma^2,\mathbf{y} \sim N\!\left(\mathbf{x}_0^T\hat{\boldsymbol{\beta}},\sigma^2(1+h_0)\right). $$

Now integrate over the posterior uncertainty in \(\sigma^2\). A normal distribution whose variance is scaled by an inverse-chi-square random variable has a Student t distribution. In this case, the degrees of freedom are \(\nu=n-p\), the location is \(\mathbf{x}_0^T\hat{\boldsymbol{\beta}}\), and the scale is \(s\sqrt{1+h_0}\):

$$ \frac{Y_0-\mathbf{x}_0^T\hat{\boldsymbol{\beta}}} {s\sqrt{1+h_0}}\mid\mathbf{y} \sim t_{n-p}. $$

The scale in this expression is not generally the standard deviation of the predictive distribution. When \(n-p>2\), its variance is \(s^2(1+h_0)(n-p)/(n-p-2)\); for \(n-p\leq2\), the t distribution has no finite variance. The t form also reflects uncertainty about \(\sigma^2\), in addition to the coefficient and residual components conditional on \(\sigma^2\).

Worked Example: A Student t Predictive Distribution

Consider hypothetical observations with one predictor \(x\): \(x=(0,1,2,3,4)\) and \(y=(2,3,5,4,6)\). The fitted line and residual calculation are shown so the predictive quantities can be checked directly.

Here \(\bar{x}=2\), \(\bar{y}=4\), \(\sum(x_i-\bar{x})(y_i-\bar{y})=9\), and \(\sum(x_i-\bar{x})^2=10\). The slope is \(9/10=0.9\), and the intercept is \(4-0.9(2)=2.2\). At \(x_0=2.5\), the fitted mean is \(2.2+0.9(2.5)=4.45\).

The fitted values are \(2.2,3.1,4.0,4.9,5.8\), giving residuals \(-0.2,-0.1,1.0,-0.9,0.2\). Thus \(\mathrm{RSS}=0.04+0.01+1.00+0.81+0.04=1.90\), and \(s^2=1.90/(5-2)=0.6333\) squared outcome units.

For an intercept and one predictor, \(h_0=1/n+(x_0-\bar{x})^2/\sum(x_i-\bar{x})^2\). Therefore \(h_0=1/5+(2.5-2)^2/10=0.225\). The predictive scale is \(s\sqrt{1+h_0}=\sqrt{0.6333(1.225)}=\sqrt{0.7758}=0.8808\) outcome units, with \(5-2=3\) degrees of freedom. The predictive distribution is \(t_3\) centered at \(4.45\), with scale \(0.8808\). It is not a normal distribution with standard deviation \(0.8808\).

For illustration, a central 95% posterior predictive interval under the stated model and prior is \(4.45\pm3.182(0.8808)\), or approximately \([1.647,7.253]\) outcome units. This interval is wide partly because only five observations were used and the t distribution has heavy tails with three degrees of freedom.

Turning the Distribution Into a Predictive Draw

A draw from the predictive distribution can be generated in stages. Draw \(\sigma^2\) from its posterior distribution, draw coefficients from their conditional posterior given that variance, then draw a new residual and add it to the resulting conditional mean. This construction shows concretely where each source of uncertainty enters.

1
Draw the residual variance.
Under the specified prior and model, draw \(\sigma^2\) from its posterior, determined by the residual sum of squares and \(n-p\) degrees of freedom.
2
Draw the coefficients.
Conditional on that \(\sigma^2\), draw \(\boldsymbol{\beta}\) from its multivariate normal posterior centered at \(\hat{\boldsymbol{\beta}}\).
3
Draw the missing outcome.
Calculate \(\mathbf{x}_0^T\boldsymbol{\beta}\), draw \(\varepsilon_0\sim N(0,\sigma^2)\), and set \(Y_0=\mathbf{x}_0^T\boldsymbol{\beta}+\varepsilon_0\).

Worked Example: Constructing One Predictive Draw

Continue with the hypothetical regression above, where the fitted line is \(2.2+0.9x\), and consider \(x_0=2.5\). Suppose one draw-generation run returns \(\sigma^2=0.50\) squared outcome units and coefficient draw \((\beta_0,\beta_1)=(2.00,1.00)\). These are illustrative draws, not estimates to substitute for the posterior distribution.

The drawn conditional mean is \(2.00+1.00(2.5)=4.50\) outcome units. Suppose the residual step draws a standard normal value \(z=-0.40\). Then \(\varepsilon_0=\sqrt{0.50}(-0.40)=-0.2828\) outcome units, and the predictive draw is \(Y_0=4.50-0.2828=4.217\) outcome units.

The coefficient draw moved the conditional mean away from the fitted mean of \(4.45\); the residual draw then moved the individual outcome away from that drawn mean. A different run will generally produce a different imputed value.

Diagnostics, Alternatives, and Limitations

The derivation depends on a reasonable conditional normal linear model. Inspect residual patterns for curvature, changing spread, and influential observations; examine whether predictions for missing cases are far beyond the predictor region represented by observed cases. A large \(h_0\) signals greater uncertainty in the fitted mean, and may indicate extrapolation. Such checks do not prove the model correct, but conspicuous departures can make its predictive draws unreliable.

The main alternative is a plug-in prediction, which uses \(\mathbf{x}_0^T\hat{\boldsymbol{\beta}}\) as the imputed value or adds residual noise while holding fitted parameters fixed. A deterministic plug-in omits both sources of uncertainty. Adding residual noise alone includes individual-level variation but still treats estimated coefficients as known. By contrast, the predictive construction above allows both coefficient and residual variation. In multiple imputation, omitting parameter uncertainty can understate uncertainty in subsequent analyses.

The normal linear model can also be unsuitable when the conditional mean is nonlinear, the residual spread changes substantially with predictors, or the outcome’s support is bounded or strongly skewed. Transformations, models for bounded values, and two-part models are distinct choices for such settings; a normal predictive draw should not be assumed to respect a variable’s natural limits. The predictive derivation also does not by itself settle whether the predictors included in an imputation model are adequate or whether missingness assumptions are appropriate.

Common pitfall: “The fitted mean is the most likely value, so I will impute it and treat it as a draw.” A fitted mean is a point prediction, not a random draw from the predictive distribution. Repeating the same point for cases with the same predictors suppresses variation; using a predictive draw instead incorporates uncertainty in the regression and residual outcome.
Key takeaway: At a specified predictor vector, coefficient uncertainty contributes \(\sigma^2h_0\) to predictive variance, and a new outcome’s residual contributes \(\sigma^2\). With unknown variance under the stated normal-model prior, integrating these uncertainties gives a Student t predictive distribution with \(n-p\) degrees of freedom and scale \(s\sqrt{1+h_0}\).

Check Your Understanding

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

  1. If \(h_0=0.10\) and known \(\sigma^2=4\) squared outcome units, what are the coefficient contribution, residual contribution, and predictive standard deviation?
  2. Why is \(\sigma^2h_0\) alone not the predictive variance for a new individual outcome?
  3. In the hypothetical regression example, what are the predictive degrees of freedom and the predictive scale at \(x_0=2.5\)?
  4. What does a large \(h_0\) indicate, and name one diagnostic concern it can raise.

Solutions. (1) The coefficient contribution is \(4(0.10)=0.40\) squared outcome units; the residual contribution is \(4\) squared outcome units. The total is \(4.40\), so the predictive standard deviation is \(\sqrt{4.40}=2.098\) outcome units. (2) It describes uncertainty in the estimated conditional mean; a new outcome also varies around that mean, adding residual variance \(\sigma^2\). (3) There are \(n-p=5-2=3\) degrees of freedom, and the scale is \(s\sqrt{1+h_0}=\sqrt{0.6333(1.225)}=0.8808\) outcome units. (4) It indicates greater coefficient-related uncertainty at that predictor vector; the case may be far from the observed predictor region, so extrapolation and model dependence warrant attention.

Clinical Biostats