Tutorials › Generalized Linear Models › Joint Wald Tests for Several Coefficients

Wald Score and Likelihood-Ratio Tests · Tutorial 270 of 981

Joint Wald Tests for Several Coefficients

Learn to formulate and calculate a joint Wald test, use the full covariance matrix, and interpret its result alongside individual coefficient tests.

Intermediate 12 min read

What You'll Learn

  • Express several coefficient hypotheses as a full-row-rank matrix restriction.
  • Construct the Wald quadratic form using the covariance of the restricted estimates.
  • Derive the asymptotic chi-square reference distribution and degrees of freedom.
  • Calculate joint tests for zero coefficients and more general linear restrictions.
  • See how coefficient covariance can change a joint conclusion.
  • Distinguish a joint test from a collection of separate coefficient tests.

Why Test Coefficients Jointly?

A model may contain several coefficients that represent one scientific question. For example, a treatment effect may vary across two subgroups, making the treatment coefficient and its interaction coefficient jointly relevant. Testing each coefficient separately does not, in general, test the combined claim that both are zero. A joint Wald test evaluates a set of linear restrictions together, using the covariance among the coefficient estimates.

The key calculation is a squared distance: how far the estimated restrictions are from their hypothesized values, measured in units of their estimated covariance. Because that covariance includes off-diagonal terms, the test can give a different conclusion from tests that consider each coefficient in isolation.

Hypotheses and the Wald Quadratic Form

Definition: Let \(\beta\) be a \(p\)-dimensional vector of model coefficients, and let \(A\) be a known \(q\times p\) matrix with full row rank \(q\). A set of \(q\) linear restrictions has null hypothesis \(H_0:A\beta=c\), where \(c\) is a known \(q\)-dimensional vector. If \(\hat\beta\) estimates \(\beta\) and \(\widehat V\) estimates the covariance matrix of \(\hat\beta\), the Wald statistic is
$$ W=(A\hat\beta-c)^\top(A\widehat V A^\top)^{-1}(A\hat\beta-c). $$

The vector \(A\hat\beta-c\) contains the estimated departures from all \(q\) restrictions. Its covariance estimate is \(A\widehat V A^\top\), so the inverse covariance scales and combines those departures. In particular, the calculation requires the covariance between the restricted estimates, not just their separate variances.

For a test that \(q\) selected coefficients are zero, \(A\) selects those coefficients and \(c\) is the zero vector. More general choices of \(A\) test sums, differences, or other linear combinations. The requirement that \(A\) have full row rank rules out redundant restrictions. If some proposed restrictions are redundant, reduce them to an independent set before using the formula; the degrees of freedom are the number of independent restrictions.

Reference Distribution and Justification

Suppose the coefficient estimator has the asymptotic distribution \(\sqrt n(\hat\beta-\beta_0)\xrightarrow{d}N(0,\Omega)\), where \(\Omega\) is positive definite, and suppose \(\hat\Omega\xrightarrow{p}\Omega\). Here \(\widehat V=\hat\Omega/n\) estimates the covariance of \(\hat\beta\). In a GLM, \(\Omega\) may be obtained from the model-based information under the appropriate regularity conditions, or from a consistent sandwich covariance estimator when that is the intended covariance. The result below is asymptotic; it does not assert an exact finite-sample chi-square distribution.

Theorem: Under the stated asymptotic normality and covariance consistency conditions, if \(H_0:A\beta_0=c\) is true and \(A\) has full row rank, then \(W\xrightarrow{d}\chi^2_q\). Thus an asymptotic level-\(\alpha\) test rejects when \(W>\chi^2_{q,1-\alpha}\), the \(1-\alpha\) quantile of the chi-square distribution with \(q\) degrees of freedom.

Proof. Under the null, \(A\beta_0=c\). Define \(Y_n=\sqrt n(A\hat\beta-c)\) and \(S=A\Omega A^\top\). By the assumed asymptotic normality and the fact that a linear transformation of a multivariate normal vector is multivariate normal,

$$ Y_n=A\sqrt n(\hat\beta-\beta_0)\xrightarrow{d}N(0,S). $$

Since \(\Omega\) is positive definite and \(A\) has full row rank, \(S\) is positive definite: for every nonzero \(u\in\mathbb R^q\), \(A^\top u\ne0\), so \(u^\top S u=(A^\top u)^\top\Omega(A^\top u)>0\). Also \(A\hat\Omega A^\top\xrightarrow{p}S\). The statistic can be written

$$ W=Y_n^\top(A\hat\Omega A^\top)^{-1}Y_n. $$

By continuity of matrix inversion at the positive-definite matrix \(S\), the estimated inverse converges in probability to \(S^{-1}\). Slutsky's theorem and the continuous mapping theorem therefore give \(W\xrightarrow{d}Y^\top S^{-1}Y\), where \(Y\sim N(0,S)\). The vector \(S^{-1/2}Y\) has a \(q\)-dimensional standard normal distribution, and \(Y^\top S^{-1}Y=(S^{-1/2}Y)^\top(S^{-1/2}Y)\) is the sum of squares of \(q\) independent standard normal variables. That sum has a \(\chi^2_q\) distribution. \(\square\)

Worked Calculations

Worked Example: Testing Two Coefficients Against Zero

Suppose a fitted GLM gives two coefficient estimates \(\hat\beta_1=0.4\) and \(\hat\beta_2=0.3\), with estimated covariance matrix

$$ \widehat V= \begin{pmatrix} 0.04&0.03\\ 0.03&0.09 \end{pmatrix}. $$

Test \(H_0:\beta_1=\beta_2=0\). Here \(A\) is the \(2\times2\) identity matrix, \(c=(0,0)^\top\), and \(A\hat\beta-c=(0.4,0.3)^\top\). The determinant of \(\widehat V\) is \(0.04(0.09)-0.03^2=0.0027\), so

$$ \widehat V^{-1} =\frac{1}{0.0027} \begin{pmatrix} 0.09&-0.03\\ -0.03&0.04 \end{pmatrix}. $$

Consequently,

$$ W= \frac{0.09(0.4)^2-2(0.03)(0.4)(0.3)+0.04(0.3)^2}{0.0027} =\frac{0.0144-0.0072+0.0036}{0.0027} =4. $$

The reference distribution is \(\chi^2_2\); its upper-tail probability at 4 is \(e^{-4/2}\approx0.1353\). The individual Wald statistics are \(0.4^2/0.04=4\) and \(0.3^2/0.09=1\). At the 5% level, the first individual test rejects, but the joint test does not. The joint test addresses the two restrictions together and accounts for the positive covariance between the estimates; it is not obtained by adding the two individual statistics.

Worked Example: Testing Two General Linear Restrictions

Let \(\beta=(\beta_1,\beta_2,\beta_3)^\top\), with estimates \((0.2,0.5,0.1)^\top\) and covariance estimate

$$ \widehat V= \begin{pmatrix} 0.04&0&0\\ 0&0.09&0\\ 0&0&0.16 \end{pmatrix}. $$

Test the two restrictions \(\beta_1+\beta_2=1\) and \(\beta_2-\beta_3=0\). They correspond to

$$ A= \begin{pmatrix} 1&1&0\\ 0&1&-1 \end{pmatrix}, \qquad c= \begin{pmatrix} 1\\0 \end{pmatrix}. $$

The estimated restriction residual is

$$ r=A\hat\beta-c= \begin{pmatrix} 0.2+0.5-1\\ 0.5-0.1 \end{pmatrix} = \begin{pmatrix} -0.3\\0.4 \end{pmatrix}. $$

Transforming the covariance gives

$$ A\widehat V A^\top= \begin{pmatrix} 0.09+0.04&0.09\\ 0.09&0.09+0.16 \end{pmatrix} = \begin{pmatrix} 0.13&0.09\\ 0.09&0.25 \end{pmatrix}. $$

Its determinant is \(0.13(0.25)-0.09^2=0.0244\), and its inverse is

$$ (A\widehat V A^\top)^{-1} =\frac{1}{0.0244} \begin{pmatrix} 0.25&-0.09\\ -0.09&0.13 \end{pmatrix}. $$

Therefore,

$$ W=\frac{0.25(0.09)-2(0.09)(-0.3)(0.4)+0.13(0.16)}{0.0244} =\frac{0.0225+0.0216+0.0208}{0.0244} =\frac{0.0649}{0.0244} \approx2.660. $$

With two restrictions, the asymptotic reference distribution is \(\chi^2_2\). The upper-tail probability is \(e^{-2.660/2}\approx0.264\), so this test does not reject at the 5% level. The nonzero off-diagonal entry \(0.09\) in the transformed covariance arises because the two restrictions both involve \(\beta_2\).

Worked Example: Strong Correlation Changes the Joint Test

Suppose \(\hat\beta=(0.5,0.5)^\top\), and test \(H_0:\beta_1=\beta_2=0\) using

$$ \widehat V= \begin{pmatrix} 0.04&0.036\\ 0.036&0.04 \end{pmatrix}. $$

The covariance between the estimates is large and positive. The sum of the estimates is \(1\), and its estimated variance is \(0.04+0.04+2(0.036)=0.152\). The residual vector \((0.5,0.5)^\top\) points in the sum direction, so its covariance-scaled squared distance is

$$ W=\frac{(0.5+0.5)^2}{0.152} =\frac{1}{0.152} \approx6.579. $$

For two degrees of freedom, the upper-tail probability is \(e^{-6.579/2}\approx0.0373\), giving rejection at the 5% level. If the covariance were incorrectly discarded, the calculation would be \(0.5^2/0.04+0.5^2/0.04=12.5\), which is not the Wald statistic for the stated covariance matrix. Correlation matters because uncertainty in a sum or difference depends on the covariance between its component estimates.

Equivalent Ways to Write the Same Restrictions

A change of coordinates among the restrictions does not change the Wald statistic, provided it is invertible. This is useful when the same hypothesis is written using different but equivalent linear combinations.

Result: If \(C\) is an invertible \(q\times q\) matrix, replacing \(A\beta=c\) by \(CA\beta=Cc\) leaves \(W\) unchanged.

Proof. Write \(r=A\hat\beta-c\) and \(M=A\widehat V A^\top\). Under the transformed restrictions, the residual is \(Cr\) and the covariance estimate is \(CMC^\top\). Since \(C\) and \(M\) are invertible, \((CMC^\top)^{-1}=C^{-\top}M^{-1}C^{-1}\). Hence the transformed statistic is

$$ (Cr)^\top(CMC^\top)^{-1}(Cr) =r^\top C^\top C^{-\top}M^{-1}C^{-1}Cr =r^\top M^{-1}r, $$

which is the original statistic. \(\square\)

Interpretation and Common Pitfalls

The degrees of freedom are the number of independent restrictions, \(q\), not the total number of coefficients in the fitted model. A test of two selected coefficients in a model with many other coefficients therefore uses a two-degree-of-freedom reference distribution. The covariance calculation still uses the estimates’ covariance under the fitted model, transformed to the restrictions by \(A\widehat V A^\top\).

A common mistake is to test each coefficient separately and treat the results as a joint test—for example, to add individual Wald statistics or to conclude that a joint null is false whenever one individual test rejects. That reasoning does not evaluate the specified joint restriction with its covariance. The correction is to form the full residual vector \(A\hat\beta-c\), transform the full covariance matrix, and calculate the quadratic form. Individual tests can help describe which estimates are notable, but they answer different hypotheses.

Another frequent error is to set the off-diagonal covariances to zero simply because the hypotheses concern different coefficients. Different coefficients can have correlated estimates, and a linear combination can be more or less precisely estimated as a result. Report the restrictions, the Wald statistic, its degrees of freedom, and the asymptotic p-value together. The test evaluates the joint departure from the null; by itself it does not identify which restriction is responsible for that departure.

Check Your Understanding

Use the definitions and calculations above to answer the following questions.

  1. For \(p\) coefficients and \(q\) independent linear restrictions, what matrix determines the Wald test's degrees of freedom?
  2. Why does the Wald statistic use \(A\widehat V A^\top\) rather than only the estimated variances of the coefficients?
  3. A test concerns three independent restrictions. What is its asymptotic reference distribution under the null?
  4. Explain why adding two individual Wald statistics does not generally produce the Wald statistic for the corresponding joint null.
  5. If an equivalent set of restrictions is obtained by multiplying both sides by an invertible matrix, what happens to the Wald statistic?
Clinical Biostats