Tutorials › Generalized Linear Models › Nonlinear Confidence Intervals With Quasi-Likelihood

Quasi-Likelihood Theory · Tutorial 692 of 981

Nonlinear Confidence Intervals With Quasi-Likelihood

Learn how to propagate sandwich uncertainty through nonlinear functions of regression coefficients and construct interpretable confidence intervals.

Advanced 11 min read

What You'll Learn

  • State the regularity conditions for delta-method inference with quasi-estimators.
  • Construct Wald intervals using the gradient and sandwich covariance matrix.
  • Form positive confidence intervals for transformed means by transforming a link-scale interval.
  • Calculate confidence intervals for ratios of means from coefficient contrasts.
  • Propagate uncertainty through a nonlinear probability transformation.
  • Recognize when a first-order delta-method interval is unreliable.

Why Nonlinear Confidence Intervals Need a Gradient

A confidence interval for a regression coefficient does not directly answer every scientific question. Researchers may want a fitted mean, a ratio of two fitted means, or a probability at a specified covariate pattern. These quantities are usually nonlinear functions of the coefficient vector. Their uncertainty depends both on the uncertainty in the coefficients and on how rapidly the function changes near the estimated coefficients.

In quasi-likelihood regression, coefficient uncertainty is represented by a sandwich covariance estimate. The delta method carries that uncertainty through a differentiable function. The result is a large-sample confidence interval, not an exact finite-sample interval. In particular, the interval's standard error must use the full covariance matrix, including its off-diagonal entries when they affect the function.

Definition: Let \(\hat{\beta}\) be a \(p\)-dimensional quasi-estimator of \(\beta_0\), and let \(\hat{\Sigma}\) estimate its covariance matrix, typically by a sandwich estimator. For a differentiable scalar function \(g:\mathbb{R}^p\to\mathbb{R}\), the first-order delta-method variance estimate for \(g(\hat{\beta})\) is $$ \widehat{\operatorname{Var}}\{g(\hat{\beta})\} = \nabla g(\hat{\beta})^\mathsf{T}\hat{\Sigma}\nabla g(\hat{\beta}). $$ The corresponding estimated standard error is the square root of this quantity.

The gradient is a column vector of partial derivatives. It describes the local sensitivity of \(g\) to changes in each coefficient. The sandwich covariance summarizes the joint uncertainty of those coefficients. Together, they determine the uncertainty in the target quantity.

The Delta-Method Wald Interval

Suppose the coefficient estimator satisfies the asymptotic normality established for quasi-estimators: for a fixed-dimensional parameter, \(\sqrt{n}(\hat{\beta}-\beta_0)\xrightarrow{d}N(0,V)\), and suppose the sandwich covariance estimate satisfies \(n\hat{\Sigma}\xrightarrow{p}V\), where \(V\) is positive definite. Let \(g\) be continuously differentiable in a neighborhood of \(\beta_0\), with \(\nabla g(\beta_0)\ne 0\). The nonzero-gradient condition ensures that the first-order approximation has positive variance.

Theorem: Under these conditions, $$ \frac{g(\hat{\beta})-g(\beta_0)} {\sqrt{\nabla g(\hat{\beta})^\mathsf{T}\hat{\Sigma}\nabla g(\hat{\beta})}} \xrightarrow{d}N(0,1). $$ Thus an approximate two-sided \(100(1-\alpha)\%\) confidence interval for \(g(\beta_0)\) is $$ g(\hat{\beta})\ \pm\ z_{1-\alpha/2} \sqrt{\nabla g(\hat{\beta})^\mathsf{T}\hat{\Sigma}\nabla g(\hat{\beta})}, $$ where \(z_{1-\alpha/2}\) is the standard normal quantile.

Proof. Differentiability at \(\beta_0\) gives the first-order expansion $$ g(\hat{\beta})-g(\beta_0) = \nabla g(\beta_0)^\mathsf{T}(\hat{\beta}-\beta_0) + o_p(\|\hat{\beta}-\beta_0\|). $$ Asymptotic normality implies \(\hat{\beta}-\beta_0=O_p(n^{-1/2})\), so the remainder is \(o_p(n^{-1/2})\). Therefore, by the multivariate central limit theorem and the continuous mapping theorem, $$ \sqrt{n}\{g(\hat{\beta})-g(\beta_0)\} \xrightarrow{d} N\!\left(0,\nabla g(\beta_0)^\mathsf{T}V\nabla g(\beta_0)\right). $$ Consistency of \(\hat{\beta}\), continuity of the gradient, and \(n\hat{\Sigma}\xrightarrow{p}V\) imply $$ n\nabla g(\hat{\beta})^\mathsf{T}\hat{\Sigma}\nabla g(\hat{\beta}) \xrightarrow{p} \nabla g(\beta_0)^\mathsf{T}V\nabla g(\beta_0). $$ The limit is positive because \(V\) is positive definite and the gradient is nonzero. Slutsky's theorem now gives the stated standard normal limit. The interval follows by inverting this asymptotic pivot. \(\square\)

The formula uses the estimated covariance of \(\hat{\beta}\), not the covariance of \(\sqrt{n}\hat{\beta}\). If software instead reports an estimate of \(V\), the corresponding covariance scale is \(V/n\). Confusing these scales changes the standard error by a factor of \(\sqrt{n}\).

Transformed Means and Link-Scale Intervals

For a generalized linear model, write the linear predictor at covariate vector \(x\) as \(\eta=x^\mathsf{T}\beta\), and let the mean be \(\mu=h^{-1}(\eta)\), where \(h\) is the link function. The fitted mean is a nonlinear function of \(\beta\). If \(h^{-1}\) is differentiable, the gradient is $$ \nabla_\beta h^{-1}(x^\mathsf{T}\beta) = \frac{d h^{-1}(\eta)}{d\eta}\,x. $$ Thus, for covariance estimate \(\hat{\Sigma}\), the delta-method variance estimate of the fitted mean is $$ \left\{\frac{d h^{-1}(\hat{\eta})}{d\eta}\right\}^{2} x^\mathsf{T}\hat{\Sigma}x, \qquad \hat{\eta}=x^\mathsf{T}\hat{\beta}. $$

When the inverse link is positive and monotone, another useful procedure is to first form a Wald interval for \(\eta\), then transform both endpoints using \(h^{-1}\). For a log link, \(h^{-1}(\eta)=\exp(\eta)\), so the resulting interval is positive and generally asymmetric. It is not the same finite-sample interval as the symmetric delta-method interval for the mean, although both have the same first-order asymptotic coverage under the stated regularity conditions.

Worked Example: A Mean Under a Log Link

At a specified covariate pattern, suppose the estimated linear predictor is \(\hat{\eta}=0.8\), and its sandwich estimated variance is \(0.17\). Find the fitted mean, its delta-method standard error, and a 95% interval formed by transforming a linear-predictor interval.

Under a log link, \(\hat{\mu}=\exp(0.8)=2.2255409\ldots\). The standard error of the linear predictor is \(\sqrt{0.17}=0.4123106\ldots\). Since the derivative of \(\exp(\eta)\) is \(\exp(\eta)\), the delta-method standard error for the mean is $$ \exp(0.8)\sqrt{0.17} = 2.2255409\ldots(0.4123106\ldots) = 0.9176\ \text{approximately}. $$

For the transformed interval, the 95% linear-predictor endpoints are $$ 0.8\pm1.96\sqrt{0.17} = (-0.0081287\ldots,\ 1.6081287\ldots). $$ Exponentiating the endpoints gives $$ \bigl(\exp(-0.0081287\ldots),\exp(1.6081287\ldots)\bigr) \approx (0.992,\ 4.993). $$ Both endpoints are positive, as required for a mean parameter under this link. This interval is asymmetric around \(2.2255\); the asymmetry reflects the exponential transformation.

Ratios of Means

Ratios are common targets in clinical and epidemiological analyses. With a log link, a ratio of fitted means simplifies: for covariate patterns \(x_1\) and \(x_0\), $$ \frac{\mu(x_1)}{\mu(x_0)} = \exp\{(x_1-x_0)^\mathsf{T}\beta\}. $$ Let \(d=x_1-x_0\). The log ratio is the linear contrast \(d^\mathsf{T}\beta\), whose estimated variance is \(d^\mathsf{T}\hat{\Sigma}d\). A confidence interval on the log-ratio scale can therefore be exponentiated to obtain a positive interval for the ratio. Its endpoints are usually not symmetric around the estimated ratio.

Worked Example: A Ratio of Two Fitted Means

Suppose a log-link model has coefficient estimates \(\hat{\beta}_0=0.3\), \(\hat{\beta}_1=0.5\), and \(\hat{\beta}_2=-0.2\). Compare the fitted mean at \(x_1=(1,1,0)^\mathsf{T}\) with the fitted mean at \(x_0=(1,0,1)^\mathsf{T}\). Assume the sandwich covariance estimate is diagonal, with entries \(0.04,0.09,0.04\), respectively.

The contrast vector is \(d=x_1-x_0=(0,1,-1)^\mathsf{T}\), so the estimated log ratio is $$ d^\mathsf{T}\hat{\beta}=\hat{\beta}_1-\hat{\beta}_2=0.5-(-0.2)=0.7. $$ The estimated ratio is \(\exp(0.7)=2.0138\). Its log-scale estimated variance and standard error are $$ d^\mathsf{T}\hat{\Sigma}d=0.09+0.04=0.13, \qquad \sqrt{0.13}=0.3606. $$ The intercept variance contributes nothing because the intercept cancels in the contrast. The 95% log-ratio interval is $$ 0.7\pm1.96\sqrt{0.13} = (-0.006688\ldots,\ 1.406688\ldots). $$ Exponentiating gives a ratio interval of approximately \((0.993,\ 4.082)\). It includes 1, so this interval does not exclude equal fitted means at the 95% level. The conclusion concerns this interval and its approximation; it is not a statement that the two means are identical.

For comparison, a direct delta-method interval on the ratio scale has standard error \(\exp(0.7)\sqrt{0.13}\approx0.7261\), giving approximately \(2.0138\pm1.96(0.7261)=(0.591,\ 3.437)\). This is a different, symmetric interval. Transforming the log-scale interval preserves positivity and is often more natural for a ratio.

Other Nonlinear Targets

The same calculation applies to any smooth scalar target. For a logistic mean \(p(\beta)=\{1+\exp(-x^\mathsf{T}\beta)\}^{-1}\), write \(\hat{p}=p(\hat{\beta})\). Differentiating gives $$ \nabla_\beta p(\hat{\beta})=\hat{p}(1-\hat{p})x. $$ Thus its delta-method variance estimate is \(\{\hat{p}(1-\hat{p})\}^{2}x^\mathsf{T}\hat{\Sigma}x\). Alternatively, a linear-predictor interval can be transformed by the logistic function, whose values lie between zero and one.

Worked Example: A Logistic Fitted Probability

At a specified covariate pattern, suppose \(\hat{\eta}=-0.4\) and the sandwich estimated variance of \(\hat{\eta}\) is \(0.09\). Compute the fitted probability, its delta-method standard error, and a 95% interval formed on the linear-predictor scale and transformed.

The fitted probability is $$ \hat{p}=\frac{1}{1+\exp(0.4)}=0.401312\ldots. $$ The linear-predictor standard error is \(\sqrt{0.09}=0.3\). Since \(d p/d\eta=p(1-p)\), the probability-scale standard error is $$ \hat{p}(1-\hat{p})(0.3) = (0.401312\ldots)(0.598688\ldots)(0.3) = 0.0721\ \text{approximately}. $$ The 95% linear-predictor interval is \(-0.4\pm1.96(0.3)=(-0.988,\ 0.188)\). Applying the logistic function to both endpoints gives approximately \((0.271,\ 0.547)\), an interval entirely within the probability range \((0,1)\).

Why the Gradient and Covariance Both Matter

The delta method is a local approximation: it uses the slope of the target function at the estimated coefficients. This makes it broadly useful, but also identifies circumstances in which extra caution is warranted. If the gradient is nearly zero, the first-order variance may be tiny even when second-order curvature matters. If the estimated coefficients are imprecise and the function changes sharply across their plausible range, a symmetric Wald interval can be a poor approximation. A transformation-based interval can help respect a parameter's range, but it does not remove the need for a reliable large-sample approximation.

A useful general derivation for a contrast transformed by a smooth scalar function makes the role of the gradient explicit. Let \(q=a^\mathsf{T}\beta\), where \(a\) is fixed, and let the target be \(r(\beta)=k(q)\). The chain rule gives $$ \nabla r(\beta)=k'(q)a, \qquad \widehat{\operatorname{Var}}\{r(\hat{\beta})\} = \{k'(a^\mathsf{T}\hat{\beta})\}^{2}a^\mathsf{T}\hat{\Sigma}a. $$ For the ratio \(k(q)=\exp(q)\), the variance estimate is \(\exp(2a^\mathsf{T}\hat{\beta})a^\mathsf{T}\hat{\Sigma}a\). For the log of a positive fitted mean, the target is instead the linear predictor itself, so its variance is \(x^\mathsf{T}\hat{\Sigma}x\). These are related calculations, but they answer different questions and use different scales.

Key takeaway: For a nonlinear target, identify its function of the coefficients, differentiate that function, and combine the gradient with the sandwich covariance. Then choose the interval scale deliberately: a direct delta-method interval is symmetric on the target scale, while transforming a suitable scale interval can preserve constraints such as positivity or the probability range.

Common Mistake

A frequent error is to report the standard error of the linear predictor as the standard error of a transformed mean. For example, if \(\hat{\eta}=0.8\) with standard error \(\sqrt{0.17}\), reporting \(0.4123\) as the standard error of \(\exp(\hat{\eta})\) omits the derivative of the exponential. The correction is to multiply by \(\exp(0.8)\), giving approximately \(0.9176\). More generally, the standard error of \(g(\hat{\beta})\) is not the standard error of \(\hat{\beta}\); it is determined by the gradient and the full covariance matrix.

A related mistake is to treat a transformed interval as symmetric around the transformed estimate. If a log-scale interval is \((L,U)\), the corresponding ratio interval is \((\exp(L),\exp(U))\), not the estimate plus or minus a single symmetric margin on the ratio scale. Finally, using only the diagonal variances of coefficients is incorrect whenever the gradient has multiple nonzero components and the covariance matrix has relevant off-diagonal terms.

Check Your Understanding

Use the gradient and the sandwich covariance to organize each calculation.

  1. For \(g(\beta)=\exp(a^\mathsf{T}\beta)\), derive the delta-method variance estimate in terms of \(a\), \(\hat{\beta}\), and \(\hat{\Sigma}\).
  2. Why does a log-link ratio of two fitted means depend on a coefficient contrast rather than on the intercept alone?
  3. What regularity condition on \(\nabla g(\beta_0)\) ensures a nondegenerate first-order delta-method limit when \(V\) is positive definite?
  4. For a logistic fitted probability, state the derivative with respect to the linear predictor and the resulting delta-method standard error.
  5. Explain why transforming both endpoints of a log-scale interval yields an asymmetric interval on the ratio scale.
Clinical Biostats