Why Make Inference About Contrasts?
A generalized linear model estimate is often not the scientific quantity of interest by itself. In a treatment study, the target might be a treatment coefficient, a difference between two treatment effects, or a specified combination of several coefficients. A linear contrast expresses such targets as a weighted sum of the model coefficients. Wald inference uses the estimated covariance of that sum to quantify its uncertainty.
The construction is direct, but its interpretation depends on the model parameterization and on large-sample approximations. In particular, two coefficient systems related by a linear change of coordinates give equivalent Wald inference for the same restriction. A nonlinear change of parameter generally does not preserve the finite-sample Wald statistic.
Estimated Information and a Single Contrast
Write \(J_n(\beta)\) for the model's expected Fisher information for \(\beta\) from \(n\) observations. Assume the model is regular, the true coefficient vector is an interior point, and the information is nonsingular. With known dispersion, the usual large-sample covariance estimate for the coefficient estimator \(\hat\beta\) is \(J_n(\hat\beta)^{-1}\). In a GLM, this is the inverse expected information evaluated at the fitted coefficients; for example, with design matrix \(X\), its familiar weighted form is \(X^\mathsf{T}WX/\phi\), where \(W\) contains the GLM weights and \(\phi\) is the dispersion.
For a single contrast \(c^\mathsf{T}\beta\), the estimated contrast is \(c^\mathsf{T}\hat\beta\), and its estimated variance is \(c^\mathsf{T}J_n(\hat\beta)^{-1}c\). This gives the Wald statistic for testing \(H_0:c^\mathsf{T}\beta=d\):
Under the null and the regularity conditions stated below, \(Z_W\xrightarrow{d}N(0,1)\). A corresponding approximate \(100(1-\alpha)\%\) confidence interval for the contrast is
The interval and test are two forms of the same calculation: the null value \(d\) is rejected by a two-sided level-\(\alpha\) Wald test precisely when it falls outside this interval, using the same standard-normal cutoff.
Worked Example: A Poisson Log-Rate Contrast
Suppose 10 independent observations come from each of two groups, with a Poisson log-link model \(\log(\mu_i)=\beta_0+\beta_1x_i\), where \(x_i=0\) for the reference group and \(x_i=1\) for the treatment group. The observed count totals are 20 and 30, respectively. Find a Wald interval and test for the treatment log-rate ratio \(\beta_1\).
For the reference group, the fitted mean is \(20/10=2\), so \(\hat\beta_0=\log 2\). For the treatment group, the fitted mean is \(30/10=3\), so \(\hat\beta_0+\hat\beta_1=\log 3\). Therefore \(\hat\beta_1=\log(3)-\log(2)=\log(1.5)\approx0.4055\). Since each Poisson observation has variance equal to its mean, the expected information at the fit is
For \(c=(0,1)^\mathsf{T}\), the estimated variance of \(\hat\beta_1\) is \(0.08333\), and its standard error is \(\sqrt{0.08333}\approx0.2887\). A 95% Wald interval is \(0.4055\pm1.96(0.2887)\), or approximately \((-0.160,\ 0.971)\). Because the contrast is a log rate ratio, exponentiating the endpoints gives the approximate rate-ratio interval \((e^{-0.160},e^{0.971})\approx(0.852,\ 2.64)\).
To test \(H_0:\beta_1=0\), the Wald statistic is \(Z_W=0.4055/0.2887\approx1.405\). Its squared value is about \(1.974\), below the 5% one-degree-of-freedom chi-square cutoff \(3.841\); equivalently, the 95% interval contains zero. This calculation uses the fitted expected information, not the unweighted sample size alone.
Joint Contrasts and the Wald Confidence Region
For \(q\) restrictions, the estimated covariance matrix of \(C\hat\beta\) is \(C J_n(\hat\beta)^{-1}C^\mathsf{T}\). If \(C\) has rank \(q\), this matrix is nonsingular when the coefficient information is nonsingular. The joint Wald statistic is
For testing \(H_0:C\beta=d\), its asymptotic null reference distribution is \(\chi^2_q\). The corresponding approximate confidence region for the contrast vector \(C\beta\) consists of all \(u\in\mathbb{R}^q\) satisfying
This is an ellipsoid centered at the estimated contrast vector. It accounts for the covariance among the contrasts; separate one-at-a-time intervals do not, by themselves, provide this joint region.
Worked Example: A Joint Wald Test for Two Coefficients
Suppose a fitted GLM has \(\hat\beta=(0.4,-0.2)^\mathsf{T}\) and estimated covariance matrix \(\widehat V=J_n(\hat\beta)^{-1}=\begin{pmatrix}0.04&0.01\\0.01&0.09\end{pmatrix}\). Test \(H_0:\beta_1=\beta_2=0\) at the 5% level.
Here \(C\) is the \(2\times2\) identity matrix, \(d=(0,0)^\mathsf{T}\), and the contrast covariance is \(\widehat V\). Its determinant is \(0.04(0.09)-0.01^2=0.0035\), so
Consequently, \(W=(0.4,-0.2)\widehat V^{-1}(0.4,-0.2)^\mathsf{T}\). The first diagonal contribution is \(0.16(25.714)=4.114\); the second is \(0.04(11.429)=0.457\); and the two off-diagonal contributions sum to \(2(0.4)(-0.2)(-2.857)=0.457\). Thus \(W\approx5.028\). The 5% cutoff for \(\chi^2_2\) is \(5.991\), so this joint test does not reject the null at level 0.05. The off-diagonal covariance matters: omitting it would give a different statistic.
Why the Joint Wald Test Has a Chi-Square Limit
A precise asymptotic statement needs an increasing-information regime. For example, suppose the dimension \(p\) is fixed, the true parameter \(\beta_0\) is interior, the GLM likelihood satisfies the usual differentiability and identifiability conditions, and \(J_n(\beta_0)/n\to J\), where \(J\) is positive definite. Assume the maximum-likelihood estimator is consistent and \(\sqrt n(\hat\beta-\beta_0)\xrightarrow{d}N_p(0,J^{-1})\), and that \(J_n(\hat\beta)/n\xrightarrow{p}J\). These are the regular large-sample conditions behind the following result.
Proof. Set \(V=CJ^{-1}C^\mathsf{T}\). Since \(J\) is positive definite and \(C\) has rank \(q\), \(V\) is positive definite. Under the null, the assumed asymptotic normality gives \(\sqrt n(C\hat\beta-d)\xrightarrow{d}N_q(0,V)\). Also, by consistency of the estimated information and continuity of matrix inversion, \(n C J_n(\hat\beta)^{-1}C^\mathsf{T}\xrightarrow{p}V\). Rewriting the statistic with these scaled quantities and applying Slutsky's theorem, its limit is \(Y^\mathsf{T}V^{-1}Y\), where \(Y\sim N_q(0,V)\).
Write \(Y=V^{1/2}Z\), where \(Z\sim N_q(0,I_q)\). Then \(Y^\mathsf{T}V^{-1}Y=Z^\mathsf{T}Z\), the sum of squares of \(q\) independent standard normal variables. By definition this has a \(\chi^2_q\) distribution, proving the claim. \(\square\)
Linear Changes of Coefficients and Nonlinear Transformations
Wald inference is exactly invariant to a one-to-one affine change of coefficient coordinates, provided the restriction and covariance are transformed consistently. To see this, let \(\gamma=A\beta+b\), where \(A\) is nonsingular. A restriction \(L\gamma=r\) is the same restriction as \(LA\beta=r-Lb\). The transformed estimator is \(\hat\gamma=A\hat\beta+b\), and its covariance estimate is \(A\widehat V A^\mathsf{T}\), where \(\widehat V=J_n(\hat\beta)^{-1}\). The Wald quadratic in the transformed coordinates is
which is precisely the Wald statistic for the equivalent restriction in the original coordinates. The equality follows because both the estimated contrast and its covariance are transformed by the same matrix.
A nonlinear transformation does not generally preserve this finite-sample equality. If \(\theta=g(\beta)\) is scalar and differentiable, the delta method estimates its variance by \(\nabla g(\hat\beta)^\mathsf{T}\widehat V\nabla g(\hat\beta)\). A Wald test or interval built from this local, linear approximation can differ substantially from one formed on the original coefficient scale. The two approaches can have the same large-sample behavior under suitable regularity conditions, but that does not make their finite-sample results identical.
Worked Example: A Logistic Intercept and Its Odds
In a logistic model with only an intercept, suppose 14 successes and 6 failures are observed among 20 independent Bernoulli trials. Test the null probability \(p=0.5\), equivalently the null intercept \(\beta=0\), using a Wald calculation on the logit scale and then on the odds scale.
The fitted probability is \(\hat p=14/20=0.7\), and the fitted logit is \(\hat\beta=\log\{0.7/(1-0.7)\}=\log(7/3)\approx0.8473\). The fitted information is \(20\hat p(1-\hat p)=20(0.7)(0.3)=4.2\). Thus the estimated variance of \(\hat\beta\) is \(1/4.2\approx0.2381\), with standard error \(0.4880\). On the logit scale, the Wald statistic is \(0.8473/0.4880\approx1.736\).
Now use the odds \(\theta=e^\beta\), whose estimate is \(e^{0.8473}=7/3\approx2.333\). The derivative of \(e^\beta\) at \(\hat\beta\) is \(e^{\hat\beta}=2.333\), so the delta-method standard error for the odds is \(2.333(0.4880)\approx1.139\). The odds-scale Wald statistic for \(H_0:\theta=1\) is therefore \((2.333-1)/1.139\approx1.171\), not \(1.736\).
The discrepancy is also visible in 95% intervals. The logit-scale interval is \(0.8473\pm1.96(0.4880)\approx(-0.109,\ 1.803)\); exponentiating gives an odds interval of about \((0.897,\ 6.07)\). A direct odds-scale Wald interval is \(2.333\pm1.96(1.139)\approx(0.102,\ 4.565)\). Both include the null odds of 1, but their endpoints differ considerably. This is a finite-sample consequence of using different local approximations, not a contradiction in the model.
Common Mistakes and Practical Interpretation
- Using the wrong contrast variance. For \(c^\mathsf{T}\beta\), use \(c^\mathsf{T}\widehat Vc\), including covariance terms. Adding only the variances of the coefficients is correct only in special cases, such as when the relevant estimates are uncorrelated.
- Treating several restrictions as separate tests. A joint null \(C\beta=d\) uses the full contrast covariance and a \(\chi^2_q\) reference distribution. Separate one-dimensional tests do not replace this joint test.
- Assuming every reparameterization leaves a Wald result unchanged. Exact invariance holds for equivalent restrictions under an invertible affine transformation. Nonlinear transformations can change finite-sample Wald statistics and intervals.
- Interpreting a Wald interval as exact. Its coverage is approximate and relies on the estimator's large-sample normal approximation and a reliable estimated information matrix. In small samples, poor conditioning or estimates near a parameter-space boundary can make that approximation questionable.
Wald inference is useful because it turns an estimated coefficient vector and its covariance into tests and confidence regions for scientifically chosen combinations of effects. Its main discipline is to specify the contrast first, use its complete covariance, and remember that the result is tied to the scale on which the Wald approximation is constructed.
Check Your Understanding
Use the definitions and calculations above to check your understanding.
- For \(H_0:C\beta=d\), what determines the degrees of freedom of the asymptotic Wald reference distribution?
- Write the estimated variance of the contrast \(c^\mathsf{T}\beta\) in terms of \(c\) and the estimated coefficient covariance matrix.
- Why must a joint Wald statistic include the covariances among the estimated contrasts?
- State the conditions under which an invertible affine change of coefficient coordinates preserves the Wald statistic.
- In the logistic example, why can the logit-scale and odds-scale Wald tests differ even though they express the same null hypothesis?