Tutorials › Generalized Linear Models › Confidence Intervals for GEE Contrasts

GEE Inference and Limitations · Tutorial 882 of 981

Confidence Intervals for GEE Contrasts

Learn to calculate contrast-specific sandwich standard errors and build and interpret confidence intervals for GEE effects on their appropriate scales.

Advanced 10 min read

What You'll Learn

  • Define a linear contrast of GEE regression coefficients and identify its estimate.
  • Calculate a contrast-specific standard error from the robust covariance matrix.
  • Derive a large-sample confidence interval and state the assumptions behind its coverage.
  • Interpret contrasts as marginal mean differences or log-odds differences.
  • Use the delta method for a smooth nonlinear contrast, including a difference in probabilities.
  • Distinguish a coefficient's standard error from the standard error of a contrast.

Why Confidence Intervals for Contrasts Need Their Own Standard Errors

A GEE model may contain several coefficients, but scientific questions are often about a combination of them. For example, a treatment effect at a particular visit may combine a treatment coefficient with a treatment-by-visit interaction. The uncertainty in that combination depends not only on the uncertainty in each coefficient, but also on their covariance.

The robust covariance estimator used for GEE inference accounts for within-cluster dependence under the usual large-number-of-independent-clusters justification. For a contrast, the relevant uncertainty is obtained by applying that covariance estimator to the contrast itself. It is not generally correct to use the standard error of one coefficient, or to combine coefficient standard errors as if the estimates were independent.

Definition: Let \(\beta\in\mathbb{R}^p\) be the GEE regression coefficient vector and let \(c\in\mathbb{R}^p\) be a specified, nonrandom contrast vector. The linear contrast is \(\psi=c^\top\beta\), estimated by \(\hat\psi=c^\top\hat\beta\). If \(\hat V\) estimates the covariance matrix of \(\hat\beta\), the contrast-specific estimated standard error is \(\widehat{\operatorname{SE}}(\hat\psi)=\sqrt{c^\top\hat Vc}\).

Here, \(c\) is fixed by the scientific question and the model parameterization. A zero entry means the corresponding coefficient does not contribute to the contrast. The off-diagonal entries of \(\hat V\) matter whenever two or more coefficients contribute.

Large-Sample Confidence Interval for a Linear Contrast

State the asymptotic conditions in terms of the number \(K\) of independent clusters. Suppose the true coefficient vector is an interior point of the parameter space, the GEE estimator is consistent, and \(\sqrt{K}(\hat\beta-\beta)\xrightarrow{d}N(0,\Sigma)\), where \(\Sigma\) is finite and positive definite. Suppose also that the robust covariance estimator is consistent on this scale, so \(K\hat V\xrightarrow{p}\Sigma\). Standard regularity conditions for GEE are used to justify these limits; the clusters, rather than individual repeated observations within a cluster, supply the independent units.

Theorem: Under those conditions, for a fixed contrast \(c\) with \(c^\top\Sigma c>0\), an approximate two-sided \(100(1-\alpha)\%\) confidence interval for \(\psi=c^\top\beta\) is \(\hat\psi\ \pm\ z_{1-\alpha/2}\sqrt{c^\top\hat Vc}\), where \(z_{1-\alpha/2}\) is the \(1-\alpha/2\) quantile of the standard normal distribution. Its coverage probability converges to \(1-\alpha\) as \(K\to\infty\).

Proof. Because \(c\) is fixed, applying a linear transformation to the assumed asymptotic normal limit gives \(\sqrt{K}(\hat\psi-\psi)\xrightarrow{d}N(0,c^\top\Sigma c)\). Also, \(Kc^\top\hat Vc\xrightarrow{p}c^\top\Sigma c\). Since this limiting variance is positive, taking square roots and using continuity gives \(\sqrt{K}\sqrt{c^\top\hat Vc}\xrightarrow{p}\sqrt{c^\top\Sigma c}\). Slutsky’s theorem therefore yields \[ \frac{\hat\psi-\psi}{\sqrt{c^\top\hat Vc}}\xrightarrow{d}N(0,1). \] The probability that this statistic lies between \(-z_{1-\alpha/2}\) and \(z_{1-\alpha/2}\) converges to \(1-\alpha\). Rearranging that event gives the stated interval. \(\square\)

For a 95% interval, \(z_{0.975}\) is approximately \(1.96\). The interval is a large-sample, pointwise interval for the specified contrast. Its validity depends on the asymptotic conditions, not on the working correlation being exactly correct: the robust covariance estimator is intended to provide valid large-sample uncertainty under working-correlation misspecification when the mean model and other required conditions are adequate.

Worked Example: Treatment Difference at a Particular Visit

Suppose a continuous-response GEE uses an identity link and models the marginal mean at visit \(t\) as \(\beta_0+\beta_T T+\beta_t t+\beta_{Tt}Tt\), where \(T=1\) denotes treatment and \(T=0\) denotes control. The treatment-minus-control marginal mean difference at visit \(t=2\) is \(\psi=\beta_T+2\beta_{Tt}\). Suppose the fitted coefficients are \(\hat\beta_T=0.35\) and \(\hat\beta_{Tt}=0.12\), and the robust covariance submatrix for these two coefficients is \[ \begin{pmatrix} 0.04 & -0.01\\ -0.01 & 0.01 \end{pmatrix}. \]

The contrast vector for \((\beta_T,\beta_{Tt})^\top\) is \(c=(1,2)^\top\). Thus \(\hat\psi=0.35+2(0.12)=0.59\), in the response units. Its estimated variance is \[ c^\top\hat Vc=(1)^2(0.04)+(2)^2(0.01)+2(1)(2)(-0.01) =0.04+0.04-0.04=0.04. \] The standard error is \(\sqrt{0.04}=0.20\), so the approximate 95% interval is \(0.59\pm1.96(0.20)=0.59\pm0.392=(0.198,0.982)\).

The covariance term is consequential: omitting it would give variance \(0.08\), rather than \(0.04\). The interval estimates the treatment difference at visit 2, not the treatment coefficient alone.

Interpreting Contrasts on the Link Scale

In a GEE with a logit link, the modeled marginal mean \(\mu\) satisfies \(\operatorname{logit}(\mu)=\log\{\mu/(1-\mu)\}=x^\top\beta\). A linear contrast in the coefficients can therefore represent a difference in marginal log odds. Exponentiating that contrast gives a marginal odds ratio, but the interval should first be constructed on the log-odds scale.

Worked Example: A Treatment Log-Odds Contrast at Age Five

Consider a binary-response GEE with \(\operatorname{logit}\{\mu(T,a)\}=\beta_0+\beta_TT+\beta_a a+\beta_{Ta}Ta\), where \(a\) is age centered at zero. The treatment-minus-control log-odds contrast at age \(a=5\) is \(\psi=\beta_T+5\beta_{Ta}\). Suppose \(\hat\beta_T=0.30\), \(\hat\beta_{Ta}=-0.04\), and the robust covariance submatrix is \[ \begin{pmatrix} 0.0225 & -0.001\\ -0.001 & 0.0004 \end{pmatrix}. \]

The estimated log-odds contrast is \(\hat\psi=0.30+5(-0.04)=0.10\). With \(c=(1,5)^\top\), its estimated variance is \[ c^\top\hat Vc=0.0225+25(0.0004)+2(1)(5)(-0.001) =0.0225+0.0100-0.0100=0.0225. \] The standard error is \(0.15\), and the 95% interval for the log-odds contrast is \(0.10\pm1.96(0.15)=0.10\pm0.294=(-0.194,0.394)\).

Exponentiation is increasing, so exponentiating both endpoints gives the corresponding approximate interval for the marginal odds ratio: \((\exp(-0.194),\exp(0.394))\approx(0.824,1.483)\). The estimated odds ratio is \(\exp(0.10)\approx1.105\). Thus the interval includes 1, the null value for an odds ratio of 1. The covariance submatrix is positive definite: its determinant is \(0.0225(0.0004)-0.001^2=0.000008>0\).

Nonlinear Contrasts and the Delta Method

Some questions concern a smooth function \(g(\beta)\) rather than a linear combination. For example, a difference between two fitted marginal probabilities under a logit link is generally nonlinear in the coefficients. The delta method uses the local gradient of \(g\) to translate coefficient uncertainty into uncertainty for the target.

Theorem: Suppose the asymptotic normality and robust covariance consistency conditions above hold, \(g\) is differentiable in a neighborhood of \(\beta\), its gradient is continuous at \(\beta\), and \(d=\nabla g(\beta)\) satisfies \(d^\top\Sigma d>0\). Then an approximate \(100(1-\alpha)\%\) interval for \(g(\beta)\) is \(g(\hat\beta)\pm z_{1-\alpha/2}\sqrt{\nabla g(\hat\beta)^\top\hat V\nabla g(\hat\beta)}\).

Derivation. Differentiability at \(\beta\) gives \(g(\hat\beta)-g(\beta)=d^\top(\hat\beta-\beta)+r\), where \(r=o(\|\hat\beta-\beta\|)\) as \(\hat\beta\to\beta\). Consistency and the asymptotic normal limit imply \(\hat\beta-\beta=O_p(K^{-1/2})\), so \(\sqrt{K}r=o_p(1)\). Consequently, \(\sqrt{K}\{g(\hat\beta)-g(\beta)\}\xrightarrow{d}N(0,d^\top\Sigma d)\). Continuity of the gradient at \(\beta\) and consistency of \(\hat\beta\) give \(\nabla g(\hat\beta)\xrightarrow{p}d\). Together with \(K\hat V\xrightarrow{p}\Sigma\), this implies \(K\nabla g(\hat\beta)^\top\hat V\nabla g(\hat\beta)\xrightarrow{p}d^\top\Sigma d\). Slutsky’s theorem gives the standardized normal limit, and rearrangement gives the interval. \(\square\)

Worked Example: Difference Between Two Fitted Probabilities

For a binary-response GEE with logit link and treatment indicator \(T\), let the control and treatment marginal probabilities at a fixed covariate pattern be \(p_0=\operatorname{expit}(\beta_0)\) and \(p_1=\operatorname{expit}(\beta_0+\beta_T)\), where \(\operatorname{expit}(u)=1/(1+\exp(-u))\). The target probability difference is \(g(\beta_0,\beta_T)=p_1-p_0\). Suppose \(\hat\beta_0=-1\), \(\hat\beta_T=0.8\), and the robust covariance estimate is \[ \hat V= \begin{pmatrix} 0.04&0.01\\ 0.01&0.0225 \end{pmatrix}. \]

The fitted probabilities are \(p_0=\operatorname{expit}(-1)\approx0.268941\) and \(p_1=\operatorname{expit}(-0.2)\approx0.450166\). Hence \(\hat g=p_1-p_0\approx0.181225\). Since the derivative of \(\operatorname{expit}(u)\) is \(\operatorname{expit}(u)\{1-\operatorname{expit}(u)\}\), the gradient, in the coefficient order \((\beta_0,\beta_T)\), is \[ \nabla g= \begin{pmatrix} p_1(1-p_1)-p_0(1-p_0)\\ p_1(1-p_1) \end{pmatrix} \approx \begin{pmatrix} 0.050905\\ 0.247517 \end{pmatrix}. \]

Using these values, the estimated variance is \[ (0.050905)^2(0.04)+2(0.050905)(0.247517)(0.01) +(0.247517)^2(0.0225)\approx0.0017341. \] Thus the standard error is approximately \(\sqrt{0.0017341}=0.04164\), and the approximate 95% interval is \(0.181225\pm1.96(0.04164)\approx(0.0996,0.2628)\). This is an interval for the probability difference, not for the log-odds contrast. Its approximate nature follows from the delta method.

Common Mistakes and Practical Interpretation

  • Using one coefficient’s standard error for a combination. A contrast such as \(\hat\beta_T+5\hat\beta_{Ta}\) has variance involving both coefficient variances and their covariance. Use \(c^\top\hat Vc\).
  • Ignoring covariance. The covariance may increase or decrease the contrast variance. It is not safe to assume independence unless it is justified by the covariance estimate.
  • Building an odds-ratio interval on the wrong scale. Construct the interval for the log-odds contrast, then exponentiate its endpoints. Do not exponentiate the standard error or treat the coefficient-scale interval as already an odds-ratio interval.
  • Treating a delta-method interval as exact. A nonlinear contrast interval is an approximation based on local linearization and large-sample behavior.
  • Assuming differentiability alone validates a plug-in gradient. For the displayed delta-method interval, continuity of the gradient at the true parameter (or an explicit assumption that the estimated gradient is consistent) is needed.

The contrast should be specified before calculating its uncertainty: identify the target scale, express the target in terms of the model coefficients, and form the corresponding contrast vector or gradient. Interpret the resulting interval in the units of that target. As with other sandwich-based GEE intervals, the large-sample justification relies on having enough independent clusters; the normal approximation is not a guarantee of accurate coverage with few clusters.

Check Your Understanding

Use the contrast or gradient covariance formula, rather than individual standard errors alone.

  1. For \(\psi=\beta_1-2\beta_3\), write the contrast vector and the expression for its estimated variance.
  2. Why can the standard error of \(\hat\beta_1+2\hat\beta_2\) not generally be found by adding the two coefficient standard errors?
  3. In a logit-link GEE, what quantity is obtained by exponentiating a treatment-minus-control log-odds contrast?
  4. When constructing a delta-method interval with an estimated gradient, what regularity condition ensures the plug-in gradient converges to the true gradient?
  5. Explain why a confidence interval for a nonlinear probability difference is approximate even when the robust covariance estimate is available.
Clinical Biostats