Tutorials › Multi-Omics Data Integration › Worked Example of Conditional Imputation and Uncertainty

Missing Modalities and Partially Observed Subjects · Tutorial 91 of 597

Worked Example of Conditional Imputation and Uncertainty

Work through Gaussian block imputation and Rubin pooling to see how conditional draws affect an association estimate and its uncertainty.

Advanced 10 min read

What You'll Learn

  • Derive the conditional distribution used to impute one missing modality from an observed modality.
  • Generate multiple completed datasets using stochastic conditional draws.
  • Estimate a cross-modality association in each completed dataset.
  • Calculate within-imputation variance, between-imputation variance, and pooled uncertainty.
  • Recognize why conditional-mean imputation and single imputation can misrepresent uncertainty.
  • Identify assumptions and diagnostics relevant to Gaussian block imputation.

Why Conditional Imputation Must Carry Uncertainty

When one omics modality is observed and another is missing for a subject, the observed measurement can inform an imputed value. But a conditional prediction is not the missing measurement itself: even for subjects with the same observed value, the unobserved modality varies. Replacing every missing block by its conditional mean suppresses that variation and can distort a cross-modality association. Multiple imputation represents this uncertainty by drawing several plausible values, analyzing each completed dataset, and combining the estimates.

The example below focuses on a single feature from each of two modalities. Let \(X\) be the observed feature and \(Y\) the feature that is missing for some subjects. The association will be summarized by the regression slope of \(Y\) on \(X\), measured in units of \(Y\) per unit of \(X\). This is an association summary, not a causal effect.

Definition: A conditional imputation draws a missing value from its predictive distribution given the observed data for that subject. In a multiple-imputation analysis, this draw is repeated to create \(m\) completed datasets. An estimate \(Q_j\) and its estimated variance \(U_j\) are calculated in completed dataset \(j\), then combined to reflect both ordinary sampling uncertainty and variation among the imputations.

Gaussian Conditional Model and Assumptions

If \(X\) and \(Y\) have a bivariate normal distribution, their conditional distribution is normal. In terms of marginal means \(\mu_X,\mu_Y\), standard deviations \(\sigma_X,\sigma_Y\), and correlation \(\rho\), the conditional mean and variance are

$$ E(Y\mid X=x)=\mu_Y+\rho\frac{\sigma_Y}{\sigma_X}(x-\mu_X), \qquad \operatorname{Var}(Y\mid X=x)=\sigma_Y^2(1-\rho^2). $$

Thus, a conditional draw includes a residual around the conditional mean, with the residual scale determined by the conditional variance. For this worked example, use the equivalent model \(Y\mid X=x\sim N(1+0.5x,1)\). Its conditional standard deviation is \(1\). Assume the model parameters are known from an independent, sufficiently informative calibration dataset. This simplifying assumption lets us focus on the draws and pooling arithmetic; in an actual analysis, uncertainty in estimated model parameters must also be represented.

The calculation relies on substantive and statistical assumptions. The conditional Gaussian model must adequately describe \(Y\) given \(X\); subjects are independent; and the missingness of \(Y\) is independent of its unobserved value after conditioning on observed information such as \(X\). This is a missing-at-random assumption for this example. There must also be observed data supporting the range of \(X\) values for which \(Y\) is imputed. A Gaussian conditional model does not by itself repair a misspecified relationship, a missingness process that depends on unobserved \(Y\) after conditioning, or lack of information at some \(X\) values.

Worked Example: Calculating Conditional Imputation Distributions

Suppose \(Y\) is missing for subjects with observed \(X\) values \(1\), \(3\), and \(5\). Under \(Y\mid X=x\sim N(1+0.5x,1)\), calculate the conditional distribution for each missing value.

For \(X=1\), the conditional mean is \(1+0.5(1)=1.5\), so \(Y\mid X=1\sim N(1.5,1)\). For \(X=3\), the mean is \(1+0.5(3)=2.5\), so \(Y\mid X=3\sim N(2.5,1)\). For \(X=5\), it is \(1+0.5(5)=3.5\), so \(Y\mid X=5\sim N(3.5,1)\). The second parameter of \(N(\mu,\sigma^2)\) is the variance; here each conditional standard deviation is \(1\).

These distributions specify uncertainty, not just predicted values. For example, the conditional mean at \(X=3\) is \(2.5\), but a conditional draw can differ from \(2.5\). The model does not assert that every subject with \(X=3\) has \(Y=2.5\).

Generating Completed Datasets

Consider six hypothetical subjects with \(X=0,1,2,3,4,5\). The observed values of \(Y\) are \(1\), missing, \(2\), missing, \(3\), missing, respectively. For the observed cases \(X=0,2,4\), the values \(1,2,3\) agree with the conditional means \(1+0.5X\). For the other three subjects, use the conditional distributions just calculated.

Worked Example: Drawing Two Completed Datasets

Generate two hypothetical conditional-draw realizations. The values below are illustrative draws, not additional observed data. In imputation 1, draw residuals \(0.5,-0.5,0.5\) at \(X=1,3,5\). Adding each residual to its conditional mean gives \(Y=2,2,4\). In imputation 2, draw residuals \(-0.5,0.5,-0.5\), giving \(Y=1,3,3\).

Subject\(X\)Observed \(Y\)Completed \(Y\), imputation 1Completed \(Y\), imputation 2
10111
21Missing21
32222
43Missing23
54333
65Missing43

Each completed dataset retains the observed \(Y\) values and fills in only the missing entries. The two datasets differ because the missing values are uncertain. In an applied analysis, \(m=2\) would generally be too small for stable inference; it is used here solely to make the pooling arithmetic transparent.

Estimating the Association and Pooling Uncertainty

In each completed dataset, fit the ordinary least-squares regression of \(Y\) on \(X\) with an intercept. Let \(Q_j\) be the estimated slope and \(U_j\) its estimated variance. For this worked calculation, use the usual homoscedastic linear-regression variance estimate \(U_j=\widehat{\sigma}_j^2/S_{XX}\), where \(S_{XX}=\sum_i(X_i-\bar X)^2\) and \(\widehat{\sigma}_j^2=\mathrm{SSE}_j/(n-2)\). This within-dataset calculation assumes independent errors with constant variance and a linear conditional mean; its small-sample approximation is used here for teaching the pooling steps, not as a claim that six subjects support precise inference.

$$ \bar Q=\frac{1}{m}\sum_{j=1}^m Q_j,\qquad \bar U=\frac{1}{m}\sum_{j=1}^m U_j,\qquad B=\frac{1}{m-1}\sum_{j=1}^m(Q_j-\bar Q)^2, \qquad T=\bar U+\left(1+\frac{1}{m}\right)B. $$

Here \(\bar U\) is the average within-imputation variance, \(B\) is the between-imputation variance, and \(T\) is the estimated variance of the pooled estimate. The factor \(1+1/m\) includes the finite-\(m\) correction for using a limited number of imputations.

Worked Example: Pooling the Two Slope Estimates

For both completed datasets, \(\bar X=2.5\) and \(S_{XX}=17.5\). The conditional mean line is \(1+0.5X\); the imputed values differ from it by residuals only at \(X=1,3,5\). The slope adjustment from this residual pattern is the sum of centered \(X\) times residual divided by \(S_{XX}\).

For imputation 1, the centered \(X\) values at the missing positions are \(-1.5,0.5,2.5\). Therefore the slope adjustment is \[ \frac{(-1.5)(0.5)+(0.5)(-0.5)+(2.5)(0.5)}{17.5} =\frac{0.25}{17.5}=0.014286. \] So \(Q_1=0.5+0.014286=0.514286\). For imputation 2, the residuals have opposite signs, giving an adjustment of \(-0.25/17.5=-0.014286\), and \(Q_2=0.485714\). The pooled slope is \(\bar Q=(0.514286+0.485714)/2=0.500000\) units of \(Y\) per unit of \(X\).

For either dataset, the residual sum of squares after fitting the intercept and slope is \[ \mathrm{SSE}=0.5^2+(-0.5)^2+0.5^2-\frac{(0.25)^2}{17.5} =0.75-0.003571=0.746429. \] The first three terms are the sum of squared imputation residuals; the final term is the reduction from fitting the slope adjustment. Thus \(\widehat{\sigma}^2=0.746429/(6-2)=0.186607\), and \[ U_1=U_2=\frac{0.186607}{17.5}=0.010663. \] The between-imputation variance is \[ B=\frac{(0.514286-0.500000)^2+(0.485714-0.500000)^2}{2-1} =0.000408. \] Consequently, \(T=0.010663+(1+1/2)(0.000408)=0.011276\), and the pooled standard error is \(\sqrt{T}=0.1062\).

A commonly used approximate degrees-of-freedom calculation for scalar pooling is \[ df=(m-1)\left(1+\frac{\bar U}{(1+1/m)B}\right)^2. \] Here \(df=(2-1)(1+0.010663/(1.5\times0.000408))^2\approx339.2\). Using a \(t\) critical value of about \(1.967\), the approximate 95% interval is \(0.5000\pm1.967(0.1062)\), or \((0.291,0.709)\) units of \(Y\) per unit of \(X\). Under the model and pooling approximation, this interval describes uncertainty in the slope; it is not a 95% probability statement about a fixed slope.

Justification, Diagnostics, and Limitations

The pooling formula reflects two sources of uncertainty. Within each completed dataset, \(U_j\) estimates the sampling variance that would remain if that completed dataset were the analysis dataset. Across completed datasets, \(B\) measures how much the estimate changes as uncertain missing values change. The average \(\bar U\) alone omits this second source. Averaging the \(Q_j\) values alone also does not quantify their uncertainty.

$$ \text{estimated total variance} = \underbrace{\bar U}_{\text{within-dataset sampling}} + \underbrace{B}_{\text{missing-data uncertainty}} + \underbrace{\frac{B}{m}}_{\text{finite number of imputations}} = \bar U+\left(1+\frac{1}{m}\right)B. $$

This decomposition is an estimate, not an identity for every finite sample. It relies on imputations that adequately represent the predictive uncertainty and on compatible estimation and imputation models. In particular, the example treated the conditional-model parameters as known. If those parameters were estimated but then held fixed when drawing missing values, variation in them would be absent from the imputations. A proper practical procedure draws from an appropriate parameter distribution, or otherwise propagates parameter-estimation uncertainty, as well as drawing the missing values conditional on those parameters.

Useful diagnostics include comparing observed \(Y\) values with the fitted conditional distribution across the range of \(X\), checking whether conditional residual spread changes with \(X\), and masking observed blocks to assess whether the procedure can recover their distribution and associations. Imputed values should also be checked against plausible measurement ranges and against the observed data patterns. Such checks can reveal a poor Gaussian fit or unsupported extrapolation, but cannot prove that missingness is independent of unobserved \(Y\) after conditioning.

Conditional-mean imputation is simpler, but gives identical predicted values to subjects with the same \(X\) and removes residual variation; it can therefore weaken variability and alter associations. A single stochastic imputation retains residual variation but still treats one arbitrary completed dataset as if it were known, so its uncertainty does not include variation across possible imputations. Multiple imputation with pooling addresses that variation, provided the imputation model and uncertainty propagation are adequate. It remains limited by model misspecification, weak overlap, small samples, and nonignorable missingness not captured by the model.

Key takeaway: Impute a missing block by drawing from its conditional distribution, not merely by substituting its conditional mean. Re-estimate the target association in every completed dataset and combine both within- and between-imputation uncertainty.

Check Your Understanding

Answer each question, then compare with the solutions.

  1. Under \(Y\mid X=x\sim N(1+0.5x,1)\), what are the conditional mean and standard deviation when \(X=4\)?
  2. Why can two imputations for a subject with the same observed \(X\) produce different \(Y\) values?
  3. If \(m=5\), \(\bar U=0.020\), and \(B=0.004\), calculate \(T\).
  4. What uncertainty is missed if model parameters are estimated but treated as fixed during imputation?

Solutions. (1) The mean is \(1+0.5(4)=3\), and the standard deviation is \(\sqrt{1}=1\). (2) Each imputation draws a new residual from the conditional distribution, so the draw need not equal the conditional mean or another draw. (3) \(T=0.020+(1+1/5)(0.004)=0.020+0.0048=0.0248\). (4) The imputations omit uncertainty in the estimated conditional-model parameters, which can understate total uncertainty in the pooled association.

Clinical Biostats