Why Construct the Interval on the Log Scale?
In a log-link count model, a difference between two linear predictors is a log rate ratio. The rate ratio itself is obtained by exponentiating that contrast. This gives a direct route to an interval: quantify uncertainty for the contrast on the scale where the model is linear, then exponentiate the lower and upper endpoints. The resulting interval is positive, as every rate ratio must be.
The interval is called a Wald confidence interval because it uses an approximately normal estimate of the log contrast and a standard error estimated from the fitted model. It is an approximation, not an exact finite-sample interval. Its reliability therefore depends on the quality of the normal approximation and of the estimated covariance matrix.
For a two-sided confidence level of \(100(1-\alpha)\%\), let \(z_{1-\alpha/2}\) be the \(1-\alpha/2\) quantile of the standard normal distribution. The Wald interval is first formed for \(\psi\), then transformed to the rate-ratio scale.
Derivation and Coverage
The interval relies on the usual large-sample conditions for Wald inference. In particular, the model must be identifiable and regular near the true parameter, the parameter must be in the interior of its parameter space, and the estimator must have an asymptotically normal distribution with a consistently estimated covariance matrix. For a fixed contrast \(c\), these conditions imply that the estimated contrast is approximately normal with estimated standard error \(s_\psi\).
To see why, write \(\psi=c^\mathsf{T}\beta\). Asymptotic normality and consistency of the estimated standard error give \[ \frac{\hat\psi-\psi}{s_\psi}\xrightarrow{d}N(0,1). \] Thus the probability that this standardized quantity lies between \(-z_{1-\alpha/2}\) and \(z_{1-\alpha/2}\) tends to \(1-\alpha\). Rearranging that event yields the log-scale interval:
The exponential function is strictly increasing. Therefore, for any real numbers \(a\), \(b\), and \(\psi\) with \(a\leq\psi\leq b\), we have \(\exp(a)\leq\exp(\psi)\leq\exp(b)\). Since \(R=\exp(\psi)\), exponentiating the two endpoints preserves the interval event exactly. The transformed interval consequently has the same coverage as the log-scale interval, asymptotically \(1-\alpha\). It also has positive endpoints, as required for a rate ratio. \(\square\)
Worked Calculations
Worked Example: A Two-Group Rate-Ratio Contrast
Suppose a fitted two-group log-link model estimates the log rate ratio for group A versus group B as \(\hat\psi=\log(2)\). The estimated variance of this contrast is \(0.0325\). Construct a 95% Wald interval for the rate ratio.
The estimated rate ratio is \(\hat R=\exp(\hat\psi)=2\). The contrast standard error is \[ s_\psi=\sqrt{0.0325}=0.1802775638\ldots. \] For a 95% interval, \(z_{0.975}\approx1.96\). Using the unrounded standard error, the margin of error is \(1.96\sqrt{0.0325}\approx0.353344025\).
The log-scale endpoints are \[ \log(2)-1.96\sqrt{0.0325}\approx0.339803 \quad\text{and}\quad \log(2)+1.96\sqrt{0.0325}\approx1.046491. \] Exponentiating these endpoints gives \[ [\exp(0.339803\ldots),\exp(1.046491\ldots)] \approx[1.405,2.848]. \]
The point estimate is a rate in group A twice the rate in group B. The interval is compatible with rate ratios from about 1.405 to 2.848 under the fitted model and its Wald approximation. Since the entire interval is above 1, it excludes equal rates at the corresponding two-sided 5% Wald level.
Worked Example: Computing the Standard Error From Two Poisson Counts
Suppose independent counts in two groups follow Poisson distributions, with observed counts \(Y_A=60\) and \(Y_B=30\) over exposures \(E_A=2000\) and \(E_B=2000\) person-years. Construct a 95% Wald interval for the rate ratio for A versus B.
The estimated rates are \(60/2000=0.03\) and \(30/2000=0.015\) events per person-year, so the estimated rate ratio is \(0.03/0.015=2\), and the estimated log rate ratio is \(\log(2)\). Under independent Poisson sampling, the log rate estimate for a group with count \(Y>0\) has estimated variance \(1/Y\). Thus the variance of the difference of the two log rates is \[ \frac{1}{60}+\frac{1}{30}=\frac{1}{60}+\frac{2}{60}=\frac{3}{60}=0.05. \] The standard error is \(\sqrt{0.05}=0.2236067977\ldots\), and the 95% margin is \(1.96\sqrt{0.05}\approx0.438269. \)
The log-scale endpoints are \[ \log(2)-1.96\sqrt{0.05}\approx0.254878 \quad\text{and}\quad \log(2)+1.96\sqrt{0.05}\approx1.131416. \] After exponentiation, the interval is approximately \[ [\exp(0.254878\ldots),\exp(1.131416\ldots)] \approx[1.290,3.100]. \]
The interval describes uncertainty about the ratio of the two underlying rates, not about either group’s future count. The exposures enter when calculating the estimated rates; under the independent Poisson model, the variance formula for the log rate ratio depends on the observed counts.
Worked Example: A Rate Ratio From an Interaction Contrast
Consider a log-link model with a binary treatment indicator \(x\), a binary covariate \(z\), and an interaction: \[ \log(\mu)=\beta_0+\beta_x x+\beta_z z+\beta_{xz}xz. \] Suppose \(\hat\beta_x=0.25\), \(\hat\beta_{xz}=0.40\), \(\widehat{\operatorname{Var}}(\hat\beta_x)=0.04\), \(\widehat{\operatorname{Var}}(\hat\beta_{xz})=0.09\), and \(\widehat{\operatorname{Cov}}(\hat\beta_x,\hat\beta_{xz})=-0.02\). Find a 95% Wald interval for the treatment rate ratio when \(z=1\).
At \(z=1\), changing \(x\) from 0 to 1 changes the linear predictor by \(\beta_x+\beta_{xz}\). The estimated log rate ratio is therefore \(0.25+0.40=0.65\), and the estimated rate ratio is \(\exp(0.65)\approx1.916\).
The estimated variance of the sum includes twice the covariance: \[ 0.04+0.09+2(-0.02)=0.09. \] Hence \(s_\psi=\sqrt{0.09}=0.30\). The 95% log-scale interval is \[ 0.65\pm1.96(0.30)=0.65\pm0.588=[0.062,1.238]. \] Exponentiating gives \([\exp(0.062),\exp(1.238)]\approx[1.064,3.448]\). This interval concerns the treatment rate ratio specifically at \(z=1\); omitting the interaction would instead give the treatment contrast at \(z=0\).
Reversing the Comparison
A rate ratio depends on the order of the groups. If \(R\) compares A with B, then the ratio comparing B with A is \(1/R\). A Wald interval transforms consistently under this reversal, with the endpoints changing order as well as being reciprocated.
Indeed, the reversed log contrast is \(-\psi\), with estimate \(-\hat\psi\) and the same standard error \(s_\psi\). Its Wald interval is \[ [-\hat\psi-z_{1-\alpha/2}s_\psi,\ -\hat\psi+z_{1-\alpha/2}s_\psi]. \] The first endpoint is the negative of the original upper endpoint, and the second is the negative of the original lower endpoint. Exponentiating gives \([1/U,1/L]\), because \(\exp(-t)=1/\exp(t)\). This also shows why simply taking reciprocals without reversing the endpoint order would give an incorrectly ordered interval. \(\square\)
Interpretation and Common Pitfalls
A Wald interval is convenient because it uses a contrast estimate and its standard error, quantities typically supplied by a fitted model. Its approximation can be poor when the estimate is far from normal, the standard error is unstable, or the model fit is weakly supported. Exponentiating the endpoints guarantees positivity; it does not repair an inaccurate normal approximation on the log scale.
- Do not add the margin on the rate-ratio scale. The symmetric interval is formed around \(\hat\psi\) on the log scale. The resulting rate-ratio interval is generally asymmetric around \(\hat R\).
- Do not exponentiate only the point estimate. Exponentiating \(\hat\psi\) gives the point estimate \(\hat R\), not its interval. Both log-scale endpoints must be exponentiated.
- Do not discard covariance terms. For a contrast involving multiple coefficients, its variance is \(c^\mathsf{T}\widehat{\operatorname{Var}}(\hat\beta)c\); correlated coefficient estimates contribute to that variance.
- Do not round intermediate values too early. In the first example, rounding the standard error or margin before calculating endpoints can change the final rounded upper endpoint. Keep adequate precision through the exponentiation.
- State the comparison and covariate profile. A rate ratio for A versus B is not the same as B versus A, and an interaction model can make the ratio depend on the other covariates.
Check Your Understanding
Answer each question by identifying the relevant contrast and showing the interval transformation.
- A fitted model gives \(\hat\psi=0.4\) and \(s_\psi=0.15\). Write the 95% log-scale Wald interval and specify how to obtain the rate-ratio interval.
- Why does exponentiating both endpoints preserve the coverage event for a rate ratio?
- In an interaction model, why might the treatment rate ratio at \(z=1\) involve more than the treatment main-effect coefficient?
- If an interval for A versus B is \([1.2,2.5]\), what is the corresponding reversed interval for B versus A?
- Why does rounding the standard error before calculating interval endpoints risk changing the reported interval?