Tutorials › Econometrics (Graduate) › Sargan And Hansen Tests Of Overidentifying Restrictions

Dynamic Panel Models · Tutorial 307 of 952

Sargan And Hansen Tests Of Overidentifying Restrictions

Learn how overidentification statistics assess a set of GMM moment restrictions and why the Hansen test is robust to heteroskedasticity while the conventional Sargan test is not.

Advanced 12 min read

What You'll Learn

  • Express dynamic-panel instrument restrictions as a vector of unit-level GMM moments.
  • Derive the overidentification statistic and its degrees of freedom.
  • Distinguish the homoskedastic Sargan test from the heteroskedasticity-robust Hansen J test.
  • Calculate and interpret overidentification tests using hypothetical GMM output.
  • Explain why rejection concerns the joint set of moment conditions and why non-rejection does not validate them.

Why Test Overidentifying Restrictions?

Dynamic-panel GMM uses instruments to form moment conditions: expectations that specified instruments are uncorrelated with the model’s errors. When there are more moment conditions than estimated parameters, the model is overidentified. The extra restrictions cannot all be used merely to determine parameter values; they also impose testable implications on the sample moments remaining after estimation.

The Sargan and Hansen tests summarize how far those estimated moments are from zero, accounting for their sampling variability. Their null hypothesis is that the full set of specified moment restrictions is valid. The two tests differ principally in how they estimate that variability: the conventional Sargan test relies on a homoskedastic covariance structure, whereas the Hansen test uses a covariance estimate that permits heteroskedasticity across panel units.

Definition: Let \(m_i(\theta)=Z_i'\Delta u_i(\theta)\) be the \(q\)-dimensional vector of moment contributions for panel unit \(i\), where \(Z_i\) is that unit’s instrument matrix and \(\Delta u_i(\theta)\) is the vector of differenced-equation residuals at parameter value \(\theta\). The sample average moment vector is \(\bar m(\theta)=N^{-1}\sum_{i=1}^N m_i(\theta)\). The overidentification tests assess whether the \(q\) moment restrictions are jointly consistent with zero after estimating the \(k\) parameters in \(\theta\).

Here \(N\) is the number of panel units, \(q\) is the number of linearly independent moment conditions, and \(k\) is the number of estimated parameters. When the model is identified and the moment conditions have full local rank, the overidentification degrees of freedom are \(q-k\). Thus, a test requires \(q>k\). With \(q=k\), the model is exactly identified: the moments can determine the parameters, but there are no extra restrictions to test.

The Hansen J Statistic

Let \(S=E[m_i(\theta_0)m_i(\theta_0)']\) be the covariance matrix of the unit-level moment contributions at the true parameter value \(\theta_0\). The Hansen test estimates this matrix using the fitted moments:

$$ \hat S=\frac{1}{N}\sum_{i=1}^N m_i(\hat\theta)m_i(\hat\theta)'. $$

This unit-level outer product allows the moments within a panel unit to be correlated and their variability to differ across units. It does not, by itself, accommodate arbitrary dependence across units. The robust two-step GMM estimator uses the inverse of an estimated moment covariance matrix as its weighting matrix; its minimized criterion is the Hansen J statistic:

$$ J_H=N\bar m(\hat\theta)'\hat S^{-1}\bar m(\hat\theta). $$

Under the null, the following conditions are needed for the usual large-sample chi-square result: the moment restrictions are valid; panel units satisfy the relevant independence and regularity conditions; \(q\) is fixed as \(N\) grows; \(\hat S\) consistently estimates a positive-definite \(S\); and the derivative matrix \(D=E[\partial m_i(\theta_0)/\partial\theta']\) has rank \(k\). The model must also be overidentified. Under these conditions, \(J_H\) has an asymptotic chi-square distribution with \(q-k\) degrees of freedom.

Theorem: For efficient GMM with a consistently estimated moment covariance matrix, the overidentification statistic \(N\bar m(\hat\theta)'\hat S^{-1}\bar m(\hat\theta)\) converges in distribution to \(\chi^2_{q-k}\) under the joint null that all \(q\) moment restrictions are valid.

Why the Degrees of Freedom Are \(q-k\)

The parameter estimates use \(k\) directions in the \(q\)-dimensional moment vector to make the moments fit as closely as possible. The statistic tests the remaining \(q-k\) directions. The projection argument makes this precise.

1
Standardize the moments.
At the true parameter, the centered sample moments \(\sqrt{N}\bar m(\theta_0)\) have asymptotic covariance \(S\). Multiplying by \(S^{-1/2}\) gives a vector with asymptotic covariance equal to the identity matrix.
2
Account for parameter estimation.
Let \(A=S^{-1/2}D\). Estimating \(k\) parameters removes the component of the standardized moments in the column space of \(A\). The remaining component is the projection onto the orthogonal complement of that space.
3
Count the remaining directions.
The projection onto the orthogonal complement has rank \(q-k\). The squared length of the projected, asymptotically standard normal vector therefore has a chi-square distribution with \(q-k\) degrees of freedom.

In matrix form, if \(z\) is asymptotically \(N(0,I_q)\), the fitted standardized moments are asymptotically \((I-P_A)z\), where \(P_A=A(A'A)^{-1}A'\). The resulting quadratic form is

$$ z'(I-P_A)z\ \sim\ \chi^2_{q-k}, $$

because \(I-P_A\) is an idempotent projection matrix of rank \(q-k\). This explains both why parameter estimation reduces the degrees of freedom and why the test concerns the restrictions jointly.

The Sargan Test and Its Assumption

The conventional Sargan statistic uses the moment covariance implied by a homoskedastic error specification. Write that covariance estimate as \(\hat S_H\). The corresponding statistic has the form

$$ J_S=N\bar m(\hat\theta)'\hat S_H^{-1}\bar m(\hat\theta). $$

When the homoskedastic covariance structure is correct, the associated weighting is efficient and \(J_S\) has an asymptotic \(\chi^2_{q-k}\) distribution under the null. The covariance structure may account for the known within-unit pattern induced by differencing; the key restriction is that the assumed disturbance variance structure is correct, rather than allowing unrestricted heteroskedasticity across units.

If error variances differ across units, \(\hat S_H\) can misstate the variability of the moments. Then the conventional Sargan statistic need not have its stated chi-square distribution, so its p-value and rejection rate may be unreliable. The Hansen test instead estimates the moment covariance from the unit-level moment contributions and is robust to such heteroskedasticity under its regularity conditions. Robustness is not automatic protection against invalid instruments, weak identification, dependence across units, or a poorly behaved moment covariance estimate.

Worked Example: A Robust Hansen Test

Suppose a hypothetical difference-GMM model has \(N=400\) panel units, \(q=3\) moment conditions, and \(k=2\) estimated parameters. Assume the moment conditions are valid under \(H_0\), units are independent, the number of moments is fixed, and the robust covariance estimate is the identity matrix. Suppose the fitted average moments are \(\bar m(\hat\theta)=(0,0,0.10)'\). For consistency with an efficient fit, take the two parameter directions to be the first two coordinates, so the fitted moments are zero in those directions.

The degrees of freedom are \(q-k=3-2=1\). The Hansen statistic is

$$ J_H=400(0,0,0.10) \begin{pmatrix} 1&0&0\\ 0&1&0\\ 0&0&1 \end{pmatrix} \begin{pmatrix} 0\\0\\0.10 \end{pmatrix} =400(0.10^2)=4.00. $$

For a \(\chi^2_1\) reference distribution, the p-value is approximately \(0.0455\). At significance level \(\alpha=0.05\), reject the joint null of valid moment restrictions. In context, this result indicates that the observed remaining instrument moments are unusually far from zero under the stated model and assumptions; it does not identify which particular instrument or restriction is responsible.

Worked Example: Heteroskedasticity Can Change the Result

Consider hypothetical GMM output with \(N=200\), \(q=2\), and \(k=1\), so \(df=1\). Suppose the fitted average moments are \(\bar m(\hat\theta)=(0,0.08)'\), and the parameter has been fitted in the first moment direction. A conventional homoskedastic calculation uses \(\hat S_H=I_2\). A heteroskedasticity-robust estimate is \(\hat S=\begin{pmatrix}1&0\\0&4\end{pmatrix}\), indicating greater estimated variance in the second moment direction.

The Sargan calculation is

$$ J_S=200(0,0.08)I_2 \begin{pmatrix} 0\\0.08 \end{pmatrix} =200(0.08^2)=1.28. $$

Against \(\chi^2_1\), this gives \(p\approx0.258\). The robust Hansen calculation is

$$ J_H=200(0,0.08) \begin{pmatrix} 1&0\\0&1/4 \end{pmatrix} \begin{pmatrix} 0\\0.08 \end{pmatrix} =200\left(\frac{0.08^2}{4}\right)=0.320. $$

Its \(\chi^2_1\) p-value is approximately \(0.572\). Both calculations fail to reject at \(\alpha=0.05\), but the statistics differ because they use different covariance assumptions. If the robust covariance is the appropriate estimate, the conventional Sargan reference calculation is not justified by these assumptions; the difference is not evidence that one test has “found” valid instruments.

Interpreting the Joint Test

Rejection means the sample evidence is inconsistent with the joint null, given the maintained model, covariance assumptions, and asymptotic approximation. Possible explanations include invalid instruments, misspecified moment conditions, or other failures of the assumptions needed for the test. Rejection alone does not reveal which explanation applies. Nor does it prove that every instrument is invalid.

Non-rejection is also limited. It means the data do not provide sufficient evidence against the full set of restrictions at the chosen significance level; it does not establish that the instruments are valid. The test may have limited power, particularly when many instruments make the moment conditions flexible. The number of instruments and the stability of estimates should therefore be considered alongside the test rather than treating a large p-value as a certification.

The test is a joint diagnostic, not a substitute for checking the model’s moment assumptions. In dynamic panels, its interpretation should be considered alongside the model specification and the Arellano-Bond tests for serial correlation: the latter address a different implication of the error process, not the joint validity of the instrument moments.

Worked Example: Non-Rejection Does Not Verify the Instruments

Suppose hypothetical output reports \(N=250\), \(q=4\), \(k=2\), and a Hansen statistic \(J_H=3.00\). Assume the robust covariance estimate is well behaved, the number of instruments is fixed for the asymptotic calculation, and the other regularity conditions hold. Then \(df=4-2=2\). For \(\chi^2_2\), the upper-tail probability is \(P(\chi^2_2\geq3.00)=e^{-3/2}\approx0.223\).

At \(\alpha=0.05\), do not reject the joint null. This is not a conclusion that the restrictions are true, nor that there is a \(22.3\%\) probability they are false. It says that a statistic at least this large would not be unusual under the joint null and the reference distribution. Substantive knowledge about instrument validity remains necessary.

Common Mistakes

  • Using the Sargan p-value under unrestricted heteroskedasticity. The conventional test relies on a homoskedastic covariance structure. Use a robust Hansen test when the moment covariance must allow heteroskedasticity, and state the assumptions behind the chosen statistic.
  • Calling non-rejection proof of validity. A non-rejection is a failure to find sufficient evidence against the joint restrictions; it does not prove them or assign a probability that they are true.
  • Treating rejection as diagnosis of one instrument. The statistic tests the restrictions jointly. Rejection does not identify an offending moment condition or establish a single cause.
  • Using \(q\) degrees of freedom. Estimating \(k\) parameters uses \(k\) directions in the moment vector, so the reference degrees of freedom are \(q-k\), provided the relevant rank conditions hold.
  • Reporting the statistic without its assumptions. State whether the test is Sargan or Hansen, its degrees of freedom and p-value, and the covariance assumptions that justify its reference distribution.
Key takeaway: The Hansen J test evaluates the remaining GMM moments using a robust estimate of their covariance; the conventional Sargan test relies on a homoskedastic covariance specification. Both are joint tests with \(q-k\) degrees of freedom under their respective assumptions. Rejection challenges the full set of restrictions, while non-rejection does not verify instrument validity.

Check Your Understanding

Use the definitions and assumptions above to answer the following.

  1. A GMM model has \(q=6\) moment conditions and \(k=4\) estimated parameters. What are the overidentification-test degrees of freedom, and why?
  2. In what sense is the Hansen test robust to heteroskedasticity, and what dependence does its unit-level covariance estimate not automatically allow?
  3. A Sargan test rejects at the 5% level, but the Hansen test does not. What does this difference suggest, and what can neither result establish on its own?
  4. Why is it incorrect to say that a Hansen p-value of 0.30 means there is a 30% probability that the instrument restrictions are valid?
  5. What is the implication for overidentification testing when a model is exactly identified, with \(q=k\)?
Clinical Biostats