Why Covariances Matter for a Contrast
A regression coefficient is rarely estimated in isolation. Within a fitted model, estimates of different coefficients may move together, or in opposite directions. That dependence is summarized by their covariance. When the target is a linear combination of coefficients, the uncertainty in that combination depends on both the individual coefficient variances and their covariances.
This matters in multiple imputation (MI) because each completed-data analysis supplies a coefficient vector and its full covariance matrix. A contrast such as the sum or difference of two coefficients must use the covariance terms in each completed-data variance calculation. Dropping them can materially change the pooled standard error, even if every coefficient variance is correct.
The weights in \(\mathbf l\) specify the requested combination. For example, \(\mathbf l=(1,1)^\mathsf{T}\) gives the sum of two coefficients, while \(\mathbf l=(1,-1)^\mathsf{T}\) gives their difference. The contrast is still one scalar estimate, but its variance must account for the joint uncertainty of the coefficient estimates.
Expanding the Matrix Formula
For two coefficients, write the covariance matrix as \(\widehat{\mathbf U}=\begin{pmatrix}U_{11}&U_{12}\\U_{12}&U_{22}\end{pmatrix}\), where \(U_{12}\) is their covariance. If the contrast is \(a\hat\beta_1+b\hat\beta_2\), direct matrix multiplication gives:
The covariance term is doubled because the matrix product contains both \(abU_{12}\) and \(baU_{21}\), and a covariance matrix is symmetric: \(U_{12}=U_{21}\). Its sign matters. For a sum, positive covariance increases the variance and negative covariance decreases it. For a difference, the sign reverses because \(ab\) is negative. Covariance is not generally zero, and zero covariance must not be assumed merely because two coefficients have different names.
The same formula applies in each imputed data set. Under the usual MI pooling setup, all imputations estimate the same coefficient vector and contrast, and the imputation-specific estimates and covariance matrices are obtained from analyses that are valid for the completed data. For \(m\) imputations, the pooled contrast and its within- and between-imputation variance estimates are:
Here \(\bar U_q\) is the average estimated sampling variance within completed-data analyses, \(B_q\) measures variation of the contrast estimates across imputations, and \(T_q\) is the MI total variance estimate. The pooled standard error is \(\sqrt{T_q}\). These are the scalar Rubin pooling quantities applied to the contrast itself.
Why the Full Matrix and Contrast Pooling Agree
The coefficient-vector version of Rubin pooling averages the within-imputation covariance matrices and adds the between-imputation covariance matrix, with the same factor \(1+1/m\). Applying a fixed linear contrast to that pooled covariance matrix gives the same total variance as first forming and pooling the scalar contrast in each imputation. The equality follows from linearity.
This equivalence assumes the same contrast weights and coefficient definitions are used in every imputation. It does not permit replacing a full covariance matrix with only its diagonal. The off-diagonal terms are part of both the within-imputation and between-imputation covariance calculations.
Worked Example: Pooling the Sum of Two Coefficients
Suppose three hypothetical completed-data analyses estimate two regression coefficients, both measured in outcome units per one-unit increase in their respective predictors. The target is their sum, so \(\mathbf l=(1,1)^\mathsf{T}\). The coefficient estimates are \((0.2,0.8)^\mathsf{T}\), \((0.6,1.4)^\mathsf{T}\), and \((1.0,2.0)^\mathsf{T}\). The corresponding covariance matrices are:
The contrast estimates are \(q_1=0.2+0.8=1.0\), \(q_2=0.6+1.4=2.0\), and \(q_3=1.0+2.0=3.0\). Thus \(\bar q=(1+2+3)/3=2.0\), and \(B_q=\{(1-2)^2+(2-2)^2+(3-2)^2\}/(3-1)=1.0\).
For each imputation, the within-imputation contrast variance includes twice the covariance: \(U_{q1}=0.25+0.36+2(0.10)=0.81\), \(U_{q2}=0.36+0.49+2(0.12)=1.09\), and \(U_{q3}=0.16+0.25+2(0.08)=0.57\). Therefore, \(\bar U_q=(0.81+1.09+0.57)/3=2.47/3=0.823333\ldots\), or \(0.8233\) to four decimal places.
With \(m=3\), the total variance is \(T_q=0.823333\ldots +(1+1/3)(1)=2.156666\ldots\). The pooled standard error is \(\sqrt{2.156666\ldots}\approx1.46856\), or \(1.469\) to three decimal places, in the contrast’s outcome units. The covariance contribution is positive in all three analyses, so ignoring it would make the within-imputation variance too small.
The Size and Direction of the Error
Ignoring covariance is not a conservative shortcut. It can reduce or inflate the variance, depending on the contrast weights and the sign of the covariance. The next example shows an understatement in a pooled analysis.
Worked Example: Omitting Positive Covariance Understates Uncertainty
Consider a hypothetical contrast that sums two coefficients. In each of five imputations, suppose the estimated covariance matrix is \(\begin{pmatrix}4&1.5\\1.5&1\end{pmatrix}\), with variances in squared outcome units. The matrix is a valid covariance matrix: its diagonal entries are positive and its determinant is \(4(1)-1.5^2=1.75>0\). Suppose the five contrast estimates are \(2,2,3,4,4\).
The full within-imputation variance of the sum is \(4+1+2(1.5)=8\), so \(\bar U_q=8\). The contrast mean is \(\bar q=(2+2+3+4+4)/5=3\), and \(B_q=\{1+1+0+1+1\}/4=1\). Thus \(T_q=8+(1+1/5)(1)=9.2\), and the pooled standard error is \(\sqrt{9.2}\approx3.033\) outcome units.
If the covariance is incorrectly dropped, the within variance becomes \(4+1=5\), and the resulting total variance is \(5+1.2=6.2\), with standard error \(\sqrt{6.2}\approx2.490\). The variance is understated by \(9.2-6.2=3.0\) squared outcome units, and the standard error is also too small. The calculation has not changed the coefficient estimates or their between-imputation variation; it has incorrectly removed part of their within-imputation joint uncertainty.
For a difference, positive covariance instead reduces the true variance. For example, with the same covariance matrix and contrast \(\hat\beta_1-\hat\beta_2\), the full variance is \(4+1-2(1.5)=2\), whereas dropping covariance gives \(5\). Thus omitting a positive covariance would overstate the variance for this contrast. The direction of the error cannot be determined without the contrast weights and covariance signs.
Worked Example: A Weighted Difference Across Imputations
Suppose a hypothetical analysis targets \(2\beta_1-\beta_2\), so \(\mathbf l=(2,-1)^\mathsf{T}\). In each of three imputations, the covariance matrix is \(\begin{pmatrix}0.09&0.04\\0.04&0.16\end{pmatrix}\), in squared coefficient units. The coefficient estimates are \((1,1)^\mathsf{T}\), \((1.5,1.5)^\mathsf{T}\), and \((2,2)^\mathsf{T}\). The corresponding contrasts are \(1\), \(1.5\), and \(2\), so \(\bar q=1.5\) and \(B_q=\{(-0.5)^2+0^2+(0.5)^2\}/2=0.25\).
The within-imputation variance is \(2^2(0.09)+(-1)^2(0.16)+2(2)(-1)(0.04)=0.36+0.16-0.16=0.36\). Thus \(\bar U_q=0.36\), and \(T_q=0.36+(1+1/3)(0.25)=0.693333\ldots\). The pooled standard error is \(\sqrt{0.693333\ldots}\approx0.833\) in the contrast’s coefficient units.
If the covariance term were omitted, the within variance would instead be \(0.52\), giving \(T_q=0.52+1.333333\ldots(0.25)=0.853333\ldots\) and a standard error of approximately \(0.924\). Here the positive covariance reduces the variance of the weighted difference. The weights’ product, \(2(-1)\), makes the covariance contribution negative.
Practical Checks and Alternatives
Before reporting a pooled contrast standard error, verify that the coefficient ordering in every covariance matrix matches the coefficient vector and contrast weights. Check that each covariance matrix is symmetric, that its diagonal entries are nonnegative, and that it is positive semidefinite up to numerical tolerance. A matrix that fails these checks may indicate a transcription, coding, or model-fitting problem. Also verify that the covariance values are on the scale of the coefficients; a covariance has units equal to the product of the two coefficient units.
A useful diagnostic is to compare the full contrast variance with the diagonal-only calculation, while treating the latter strictly as a check on the effect of omission, not as a valid default. Large differences signal that coefficient dependence is important for the requested contrast. Unexpectedly zero or implausibly large covariances may also point to a mismatch in parameter order or a poorly estimated model covariance matrix.
| Approach | What it calculates | Assessment |
|---|---|---|
| Full matrix contrast | \(\mathbf l^\mathsf{T}\widehat{\mathbf U}_j\mathbf l\) in every imputation | Uses variances and covariances; the appropriate calculation for a linear contrast. |
| Pool the scalar contrast | Calculate \(q_j\) and \(U_{qj}\), then apply scalar Rubin pooling | Equivalent to contrasting the pooled vector and covariance matrix when the weights are fixed. |
| Diagonal-only calculation | Uses coefficient variances but sets covariances to zero | Generally incorrect unless the relevant covariances are actually zero. |
| Average coefficient standard errors | Averages square roots of individual variances | Does not calculate the variance of a contrast or Rubin’s pooled total variance. |
The equivalence between the two valid approaches is useful operationally: one can calculate \(q_j\) and \(U_{qj}\) separately in each imputation, or pool the coefficient vector and covariance matrix and then apply \(\mathbf l\). The computations should agree apart from rounding. Averaging standard errors, or forming a contrast from pooled coefficient estimates while ignoring the pooled covariance matrix, does not preserve this equivalence.
This calculation assumes a fixed, correctly specified linear contrast and comparable coefficient definitions across imputations. If the model changes terms, parameterization, or coefficient scale from one imputation to another, the contrast may not represent the same estimand. The formula also does not repair invalid imputation or model assumptions; it combines the uncertainty estimates supplied by the completed-data analyses. Numerical rounding should be delayed until the final reported result, since rounding each matrix entry first can alter the averaged contrast variance.
Common Mistake
Incorrect reasoning: “The variance of the sum is just the sum of the two coefficient variances, because each coefficient has its own standard error.” This silently assumes their covariance is zero. Correction: Use \(U_{11}+U_{22}+2U_{12}\) for a sum, or the full weighted formula for a general contrast, in every imputation. Then average those within variances and add the between-imputation component. Separate standard errors do not contain enough information to recover the variance of a multi-coefficient contrast.
Check Your Understanding
For each question, identify the covariance contribution or calculate the requested pooled quantity.
- Two coefficient estimates have variances \(1\) and \(4\), and covariance \(0.5\). What is the variance of their sum?
- Using those same values, what is the variance of the difference \(\hat\beta_1-\hat\beta_2\)?
- Three imputations give contrast estimates \(1,2,3\), and within-imputation contrast variances \(0.4,0.5,0.6\). Calculate \(\bar q\), \(B_q\), \(\bar U_q\), and \(T_q\).
- For a contrast with weights \((1,2)^\mathsf{T}\), the coefficient variances are \(0.25\) and \(1\), and the covariance is \(-0.10\). Calculate the full contrast variance and compare it with the diagonal-only value.
Solutions. (1) The sum variance is \(1+4+2(0.5)=6\). (2) The difference variance is \(1+4-2(0.5)=4\). (3) \(\bar q=(1+2+3)/3=2\); \(B_q=\{(1-2)^2+0^2+(3-2)^2\}/2=1\); \(\bar U_q=(0.4+0.5+0.6)/3=0.5\); and \(T_q=0.5+(1+1/3)(1)=1.8333\). (4) The full variance is \(1^2(0.25)+2^2(1)+2(1)(2)(-0.10)=0.25+4-0.40=3.85\). The diagonal-only value is \(4.25\), so omitting the negative covariance overstates the variance by \(0.40\).