Why Form a Contrast in Each Imputation?
A regression model may report coefficients that are not themselves the scientific quantity of interest. For example, a model with an interaction may require adding a main-effect coefficient and an interaction coefficient to describe a slope in one subgroup. A comparison of two categories represented by separate coefficients may require taking their difference. Such a fixed linear combination of regression coefficients is a linear contrast.
With multiple imputation, each completed data set produces its own coefficient estimates and estimated covariance matrix. The contrast therefore has an estimate and a variance in every imputation. These are scalar quantities, so Rubin’s scalar pooling rules apply directly. The central task is to calculate both quantities correctly in each imputation before pooling them.
The vector \(\mathbf{c}\) specifies the desired combination. For example, \(\mathbf{c}=(1,-1)^{\mathsf T}\) gives the difference between two coefficients, while \(\mathbf{c}=(1,1)^{\mathsf T}\) gives their sum. Coefficients equal to zero exclude terms from the contrast. The ordering of \(\mathbf{c}\) must match the ordering of \(\hat{\boldsymbol{\beta}}_i\) and \(\mathbf{U}_i\).
Pool the Contrast as a Scalar Estimate
Suppose there are \(m\) imputations. Once \(q_i\) and \(u_i\) have been calculated for each one, define the pooled contrast estimate \(\bar{q}\), the average within-imputation variance \(\bar{U}\), the between-imputation variance \(B\), and the total variance \(T\) as follows.
Here, \(\bar{U}\) represents average uncertainty within completed data sets, while \(B\) represents variation in the contrast estimates across imputations. The factor \(1+1/m\) accounts for the finite number of imputations. The pooled standard error is \(\sqrt{T}\). These formulas pool the contrast as one scalar estimate; they do not pool separate test statistics.
Assumptions and a Variance Justification
The calculations require a consistent target and valid within-imputation inference. In each completed data set, the same regression model must define the same coefficient vector and contrast. The contrast vector must be fixed rather than chosen after inspecting which imputation gives a preferred result. The coefficient covariance matrix must correspond to the fitted model and estimator. Across imputations, the imputation procedure must provide appropriate draws under a suitably specified imputation model; the resulting completed-data estimates should target the same parameter and have estimated variances that adequately describe their sampling uncertainty.
As with scalar applications of Rubin’s rules, the usual inferential justification relies on estimates that are approximately normally distributed within completed data sets and on variance estimates that are appropriate for those estimates. These conditions may be doubtful with severe model misspecification, unstable fits, or an imputation procedure that does not adequately represent uncertainty. Pooling cannot repair such problems.
The variance expression for a contrast follows from the variance of a linear combination. If \(\hat{\boldsymbol{\beta}}_i\) has covariance matrix \(\mathbf{U}_i\), then for fixed \(\mathbf{c}\), multiplication by \(\mathbf{c}^{\mathsf T}\) gives
For two coefficients, this expression includes their covariance. In particular, if the contrast is \(\hat{\beta}_{1i}-\hat{\beta}_{2i}\), its variance is \(U_{11,i}+U_{22,i}-2U_{12,i}\), not merely the sum of the two marginal variances. The sign and size of the covariance can substantially change the uncertainty of a contrast.
Worked Example: Comparing Two Regression Coefficients
In a hypothetical analysis of an outcome measured in points, a regression model includes coefficients \(\beta_1\) and \(\beta_2\), both measured in points. The target is the difference \(\beta_1-\beta_2\), so \(\mathbf{c}=(1,-1)^{\mathsf T}\). Three imputations give the estimates and covariance entries below. Each covariance matrix is symmetric and positive definite, so it is a valid covariance matrix.
| Imputation | \(\hat{\beta}_{1i}\) | \(\hat{\beta}_{2i}\) | \(U_{11,i}\) | \(U_{22,i}\) | \(U_{12,i}\) |
|---|---|---|---|---|---|
| 1 | 1.20 | 0.40 | 0.090 | 0.040 | 0.018 |
| 2 | 1.10 | 0.50 | 0.100 | 0.050 | 0.020 |
| 3 | 1.30 | 0.35 | 0.080 | 0.045 | 0.015 |
The contrast estimates are \(q_1=1.20-0.40=0.80\), \(q_2=1.10-0.50=0.60\), and \(q_3=1.30-0.35=0.95\), all in points. Their mean is $$ \bar{q}=\frac{0.80+0.60+0.95}{3}=0.7833333. $$
For each imputation, use the covariance term in the difference variance: $$ u_1=0.090+0.040-2(0.018)=0.094,\quad u_2=0.100+0.050-2(0.020)=0.110,\quad u_3=0.080+0.045-2(0.015)=0.095. $$ Thus \(\bar{U}=(0.094+0.110+0.095)/3=0.0996667\) square points. The between-imputation variance is $$ B=\frac{(0.80-0.7833333)^2+(0.60-0.7833333)^2+(0.95-0.7833333)^2}{2} =0.0308333 $$ square points. With \(m=3\), $$ T=0.0996667+\left(1+\frac{1}{3}\right)(0.0308333) =0.1407778, \qquad \sqrt{T}=\sqrt{0.1407778}\approx0.3752. $$ The pooled estimated difference is 0.7833 points, with pooled standard error 0.3752 points. This summarizes the contrast and its uncertainty; any interval or test must use the appropriate scalar pooling inference.
More Contrasts and a Scale Check
A contrast need not be a simple difference. Its coefficients can represent a weighted combination, provided the weights are fixed and the combination answers the intended question. Multiplying every entry of \(\mathbf{c}\) by a constant multiplies every \(q_i\) by that constant and every \(u_i\), \(\bar{U}\), \(B\), and \(T\) by its square. The standard error is multiplied by the absolute value of the constant. This is a useful check on units and arithmetic.
Worked Example: A Weighted Combination
Consider a hypothetical model with two coefficients, \(\beta_1\) and \(\beta_2\), both in units of an outcome’s points. The target is \(0.5\beta_1+\beta_2\), so \(\mathbf{c}=(0.5,1)^{\mathsf T}\). Three imputations give coefficient estimates \((0.8,0.3)\), \((0.7,0.5)\), and \((0.9,0.4)\). In each imputation, the coefficient variances are \(0.04\) and \(0.09\), and their covariance is \(0.015\). The resulting covariance matrix is positive definite because its determinant is \(0.04(0.09)-0.015^2=0.003375>0\).
The contrast estimates are $$ q_1=0.5(0.8)+0.3=0.70,\quad q_2=0.5(0.7)+0.5=0.85,\quad q_3=0.5(0.9)+0.4=0.85. $$ Consequently, \(\bar{q}=(0.70+0.85+0.85)/3=0.8000\) points.
The within-imputation variance is the same in all three imputations: $$ u_i=(0.5)^2(0.04)+(1)^2(0.09)+2(0.5)(1)(0.015) =0.010+0.090+0.015=0.115. $$ Therefore, \(\bar{U}=0.115\) square points. The between-imputation variance is $$ B=\frac{(0.70-0.80)^2+(0.85-0.80)^2+(0.85-0.80)^2}{2} =\frac{0.015}{2}=0.0075 $$ square points. The total variance and pooled standard error are $$ T=0.115+\left(1+\frac{1}{3}\right)(0.0075)=0.1250, \qquad \sqrt{T}=\sqrt{0.1250}\approx0.3536 $$ points. The pooled contrast estimate is 0.8000 points, with pooled standard error 0.3536 points.
Checks, Comparisons, and Common Failure Modes
Before pooling, check that all imputations use the same model terms, coefficient order, contrast weights, and outcome scale. Confirm that every fitted model supplies a covariance matrix for the same estimator. If an imputation causes a term to disappear or a model to fail, the resulting coefficient vector may not represent the same estimand; mechanically averaging whatever estimates are available does not resolve that mismatch.
The main alternative is to report or test individual coefficients rather than the particular linear combination of interest. That is appropriate only when those individual parameters answer the scientific question. For a single contrast, computing its estimate and variance within each imputation and then applying scalar Rubin pooling is distinct from pooling a multi-parameter test statistic, as in D1, D2, or D3 procedures. Those methods address a different inferential target.
- Ignoring covariance. The variance of a contrast involving multiple coefficients includes covariance terms. Dropping them can overstate or understate uncertainty.
- Changing the contrast. Selecting different weights in different imputations means the \(q_i\) values no longer estimate one common quantity.
- Pooling only the estimates. The average \(\bar{q}\) alone does not reflect within-imputation uncertainty or variation across imputations. Calculate \(\bar{U}\), \(B\), and \(T\) as well.
- Mixing units or coefficient order. A numerically valid calculation can still be meaningless if the contrast vector is applied to the wrong coefficients or combines incompatible scales.
For example, treating the two coefficients in the first worked example as independent would give \(u_1=0.090+0.040=0.130\), rather than the correct \(u_1=0.094\). The error comes from omitting \(-2(0.018)\). A covariance matrix is not optional bookkeeping: its off-diagonal entries are part of the contrast variance.
Check Your Understanding
Answer each question, then compare your work with the solutions below.
- For \(\mathbf{c}=(1,-1)^{\mathsf T}\), the coefficient variances are 0.16 and 0.09, and their covariance is 0.04. What is the contrast variance?
- Two imputations give scalar contrast estimates \(q_1=2.0\) and \(q_2=2.4\), with within-imputation variances \(u_1=0.25\) and \(u_2=0.36\). Calculate \(\bar{q}\), \(\bar{U}\), \(B\), \(T\), and the pooled standard error.
- Why is a contrast vector required to have the same coefficient ordering in every imputation?
- If a contrast vector is multiplied by \(-2\), what happens to its estimate, variance, and standard error?
Solutions. (1) The difference variance is \(0.16+0.09-2(0.04)=0.17\) square units. (2) \(\bar{q}=(2.0+2.4)/2=2.2\), \(\bar{U}=(0.25+0.36)/2=0.305\), and \(B=[(2.0-2.2)^2+(2.4-2.2)^2]/(2-1)=0.080\). Thus \(T=0.305+(1+1/2)(0.080)=0.425\), and the pooled standard error is \(\sqrt{0.425}\approx0.6519\). (3) The weights must apply to the same named coefficients in every imputation; otherwise the computed \(q_i\) values do not represent one common contrast. (4) The estimate is multiplied by \(-2\), the variance by \((-2)^2=4\), and the standard error by \(|-2|=2\).