Tutorials › Multiple Imputation by Chained Equations (MICE) › Why Pooling Linear Contrasts Before Testing Works

Rubin's Rules and Pooling · Tutorial 74 of 497

Why Pooling Linear Contrasts Before Testing Works

Learn why a fixed contrast has the same pooled estimate and Rubin variance whether it is pooled directly or calculated from pooled coefficients and their covariance matrix.

Intermediate 11 min read

What You'll Learn

  • Define a fixed linear contrast of a vector of regression coefficients
  • Derive the equality of the two pooled point estimates
  • Show why within-imputation and between-imputation variances agree
  • Work through numerical examples of estimates, variances, and a test
  • Identify why omitting covariance terms or changing contrast weights breaks the calculation
  • Distinguish a scalar contrast from a joint test of several restrictions

Why the order of operations matters

After multiple imputation, a regression coefficient vector and its covariance matrix are pooled across imputations. A scientific question may concern a particular weighted combination of coefficients rather than any one coefficient on its own. For example, the difference between two group effects can be written as a linear contrast. It is useful to know whether that contrast should be calculated in every imputed data set and then pooled, or calculated once from the pooled coefficients.

For a fixed linear contrast, these routes agree for the point estimate and Rubin’s variance, provided the same imputations, coefficient definitions, covariance matrices, and contrast weights are used. The equivalence is an algebraic consequence of linearity, not an approximation. The small-sample inference still depends on using the same scalar Rubin degrees-of-freedom calculation for the contrast on either route.

Definition: Let \(Q_l\) be a vector of \(p\) coefficient estimates from imputation \(l\), and let \(U_l\) be its estimated covariance matrix, for \(l=1,\ldots,m\). A fixed linear contrast is \(q_l=a^\mathsf{T}Q_l\), where \(a\) is a specified vector of weights that is the same in every imputation. Its within-imputation variance is \(u_l=a^\mathsf{T}U_la\).

The contrast may compare coefficients, such as \(Q_{l1}-Q_{l2}\), or combine several coefficients using specified weights. The weights and the meaning of the coefficients must be consistent across imputations. For example, if a coefficient represents a change in outcome per year, its units are outcome units per year; the contrast’s units follow from the quantities being combined.

The pooling identity

The usual vector form of Rubin’s rules uses the pooled estimate \(\bar Q\), the average within-imputation covariance matrix \(\bar U\), the between-imputation covariance matrix \(B\), and the total covariance matrix \(T\). Here \(B\) uses the sample covariance across the \(m\) imputation-specific coefficient vectors.

$$ \bar Q=\frac{1}{m}\sum_{l=1}^m Q_l,\qquad \bar U=\frac{1}{m}\sum_{l=1}^m U_l,\qquad B=\frac{1}{m-1}\sum_{l=1}^m (Q_l-\bar Q)(Q_l-\bar Q)^\mathsf{T}, \qquad T=\bar U+\left(1+\frac{1}{m}\right)B. $$

Applying the fixed contrast to the pooled coefficient vector gives \(a^\mathsf{T}\bar Q\). Pooling the imputation-specific contrast estimates gives their average, \(\bar q=m^{-1}\sum_l q_l\). These are equal because multiplication by a fixed vector distributes over addition.

$$ \bar q=\frac{1}{m}\sum_{l=1}^m a^\mathsf{T}Q_l =a^\mathsf{T}\left(\frac{1}{m}\sum_{l=1}^m Q_l\right) =a^\mathsf{T}\bar Q. $$

The same idea establishes the variance identity. The average within-imputation variance of the contrasts is \(m^{-1}\sum_l a^\mathsf{T}U_la=a^\mathsf{T}\bar U a\). Their between-imputation variance is the sample variance of the scalar values \(q_l\). Since \(q_l-\bar q=a^\mathsf{T}(Q_l-\bar Q)\), that sample variance equals \(a^\mathsf{T}Ba\). Thus the total Rubin variance for the contrast is also the pooled covariance matrix transformed by the contrast weights.

$$ \begin{aligned} B_q &=\frac{1}{m-1}\sum_{l=1}^m(q_l-\bar q)^2\\ &=\frac{1}{m-1}\sum_{l=1}^m a^\mathsf{T}(Q_l-\bar Q)(Q_l-\bar Q)^\mathsf{T}a =a^\mathsf{T}Ba,\\ T_q &=\bar u+\left(1+\frac{1}{m}\right)B_q =a^\mathsf{T}\bar U a+\left(1+\frac{1}{m}\right)a^\mathsf{T}Ba =a^\mathsf{T}Ta. \end{aligned} $$
Theorem: For the same fixed contrast vector \(a\) in every imputation, pooling the scalar contrasts \(a^\mathsf{T}Q_l\) gives the same pooled estimate and total variance as applying \(a^\mathsf{T}\) to \(\bar Q\) and \(a^\mathsf{T}(\cdot)a\) to \(T\). The equality of estimates and variances is exact.

For inference on \(H_0:a^\mathsf{T}Q=c\), the estimate, standard error, and test statistic therefore agree on the two routes. If the same complete-data degrees of freedom and scalar Rubin degrees-of-freedom procedure are used, the resulting degrees of freedom, confidence interval, and p-value agree as well. This does not mean that every test involving a coefficient vector is a one-dimensional contrast: a joint test of several restrictions is a different question.

Worked calculations

Worked Example: Pooling a Two-Coefficient Contrast

Suppose three hypothetical imputations produce the following coefficient estimates and covariance matrices. Consider the fixed contrast \(q=Q_1+2Q_2\), so \(a=(1,2)^\mathsf{T}\). The covariance matrices are symmetric, and their diagonal entries are the estimated coefficient variances.

Imputation\(Q_l\)\(U_l\)
1\((2.0,\ 0.5)^\mathsf{T}\)\(\begin{pmatrix}0.16&0.02\\0.02&0.09\end{pmatrix}\)
2\((2.4,\ 0.3)^\mathsf{T}\)\(\begin{pmatrix}0.25&0.03\\0.03&0.16\end{pmatrix}\)
3\((1.8,\ 0.7)^\mathsf{T}\)\(\begin{pmatrix}0.09&0.01\\0.01&0.04\end{pmatrix}\)

The imputation-specific contrasts are \(q_1=2.0+2(0.5)=3.0\), \(q_2=2.4+2(0.3)=3.0\), and \(q_3=1.8+2(0.7)=3.2\). Their pooled estimate is \(\bar q=(3.0+3.0+3.2)/3=3.0667\). The pooled coefficient vector is \(\bar Q=(2.0667,\ 0.5)^\mathsf{T}\), which gives \(a^\mathsf{T}\bar Q=2.0667+2(0.5)=3.0667\) as well.

The three within-imputation contrast variances are obtained using \(a^\mathsf{T}U_la\). For the first imputation, for example, the calculation is \(0.16+4(0.09)+4(0.02)=0.6000\). The other two are \(0.25+4(0.16)+4(0.03)=1.0100\) and \(0.09+4(0.04)+4(0.01)=0.2900\). Hence \(\bar u=(0.6000+1.0100+0.2900)/3=0.6333\).

The between-imputation variance is the sample variance of \(3.0,3.0,3.2\). Their mean is \(3.0667\), so \(B_q=\{(-0.0667)^2+(-0.0667)^2+(0.1333)^2\}/2=0.01333\). With \(m=3\), the total variance is \(T_q=0.6333+(1+1/3)(0.01333)=0.6511\), and the standard error is \(\sqrt{0.6511}=0.807\).

The matrix route gives the same variance: \(a^\mathsf{T}\bar U a=0.6333\) and \(a^\mathsf{T}Ba=0.01333\), so \(a^\mathsf{T}Ta=0.6511\). The between-imputation component reflects variation in the contrast estimates, not the separate variation of each coefficient considered in isolation.

Worked Example: A Test of a Specified Contrast

Use the pooled estimate and variance from the preceding hypothetical data to test \(H_0:a^\mathsf{T}Q=2.5\) against a two-sided alternative. The contrast is still \(Q_1+2Q_2\), and its pooled estimate is \(3.0667\), with total variance \(0.6511\).

The standard error is \(\sqrt{0.6511}=0.807\). The observed test statistic is therefore \((3.0667-2.5)/0.807=0.702\).

Whether calculated from the imputation-specific contrasts or from the pooled vector and matrix, the test has this same statistic. For a two-sided test, its p-value is \(2P(T_{df}\geq 0.702)\), using the scalar Rubin degrees of freedom for this contrast. A numerical p-value requires specifying the complete-data degrees of freedom and the degrees-of-freedom adjustment; whichever appropriate scalar calculation is chosen must be applied identically on both routes. The statistic alone does not provide evidence against the null at conventional significance levels.

Covariance terms and diagnostic checks

A contrast’s variance generally depends on covariance terms as well as the variances of individual coefficients. For a two-coefficient contrast \(Q_1+2Q_2\), the within-imputation variance is \(U_{11}+4U_{22}+4U_{12}\). Dropping \(U_{12}\) changes the uncertainty estimate unless that covariance is exactly zero. This is a frequent reason for disagreement between a hand calculation and software that uses the full covariance matrix.

Worked Example: The Cost of Omitting Covariance

Suppose two hypothetical imputations give the same coefficient estimates \((1.0,2.0)^\mathsf{T}\), and in both imputations the covariance matrix is \(\begin{pmatrix}0.09&0.06\\0.06&0.16\end{pmatrix}\). For the fixed sum \(Q_1+Q_2\), each contrast estimate is \(1.0+2.0=3.0\), so \(\bar q=3.0\) and \(B_q=0\).

The correct within-imputation variance is \(0.09+0.16+2(0.06)=0.3700\), and the total variance is \(T_q=0.3700+(1+1/2)(0)=0.3700\). If the covariance is wrongly omitted, the calculated variance becomes \(0.09+0.16=0.2500\). The corresponding standard errors are \(\sqrt{0.3700}=0.6083\) and \(\sqrt{0.2500}=0.5000\). The latter understates uncertainty because the two coefficient estimates have positive covariance.

Useful checks include verifying that the contrast weights are identical across imputations, that coefficient order and coding are consistent, and that every \(U_l\) contains the covariance entries for the coefficients in the contrast. A direct numerical check is to compare \(\bar q\) with \(a^\mathsf{T}\bar Q\), and \(T_q\) with \(a^\mathsf{T}Ta\), allowing only for rounding differences.

Scope and common mistakes

This result applies to a fixed linear transformation of coefficient estimates. It does not justify substituting weights that change from imputation to imputation: if \(a_l\) varies, then generally \(m^{-1}\sum_l a_l^\mathsf{T}Q_l\) is not \(a^\mathsf{T}\bar Q\) for any one fixed \(a\). The equality also presumes that the coefficient vectors estimate the same quantities in every imputation and that the covariance matrices are valid for those estimates. Rubin’s variance and degrees-of-freedom approximations still rely on the usual conditions for multiple-imputation inference; the algebraic identity does not repair an unsuitable imputation or analysis model.

The earlier material on linear contrasts of pooled coefficients gives the basic interpretation of such a contrast. The result here explains why computing the same contrast inside every imputation leads to the same scalar pooling calculation. It is often convenient to calculate the contrast from pooled quantities, but the equivalence is a check on computation, not a reason to discard the imputation-specific estimates or covariance information.

  • Wrong reasoning: “The contrast uses two coefficients, so I can add their standard errors or variances.” Correction: use \(a^\mathsf{T}U_la\); this includes the covariance terms with the appropriate weights.
  • Wrong reasoning: “Pooling coefficient estimates first must change the contrast’s uncertainty.” Correction: for a fixed linear contrast, transforming \(\bar U\) and \(B\) gives exactly the same within- and between-imputation components as pooling the scalar contrasts.
  • Wrong reasoning: “A contrast of several coefficients is automatically a joint test.” Correction: one specified weighted sum is one scalar estimand; a joint test addresses multiple restrictions simultaneously.
Key takeaway: For a fixed contrast vector \(a\), the pooled estimate is \(a^\mathsf{T}\bar Q\) and its Rubin total variance is \(a^\mathsf{T}Ta\). Both equal the results of pooling the imputation-specific scalar contrasts, as long as the same coefficients, weights, covariance information, and scalar inference procedure are used.

Check Your Understanding

Answer each question, then check the short solutions below.

  1. What condition on the contrast weights is needed for the pooling identity?
  2. If \(a=(1,-1)^\mathsf{T}\), write the within-imputation variance using the entries of \(U_l\).
  3. Why does the between-imputation variance of the contrast equal \(a^\mathsf{T}Ba\)?
  4. In the covariance example, what variance would be calculated if the covariance were negative \(0.06\) instead of positive \(0.06\)?
  5. Does a single contrast of three coefficients constitute a joint test of three restrictions? Briefly explain.

Solutions. (1) The same fixed vector \(a\) must be used in every imputation. (2) \(U_{11}+U_{22}-2U_{12}\), since the contrast weights are \(1\) and \(-1\). (3) Each centered scalar contrast is \(q_l-\bar q=a^\mathsf{T}(Q_l-\bar Q)\); inserting this into the sample-variance formula gives \(a^\mathsf{T}Ba\). (4) The variance is \(0.09+0.16+2(-0.06)=0.1300\). (5) No. It is one scalar linear combination; a joint test addresses multiple restrictions together.

Clinical Biostats