Tutorials › Econometrics (Graduate) › Testing Subsets Of Dynamic-Panel Moment Conditions

Dynamic Panel Models · Tutorial 308 of 952

Testing Subsets Of Dynamic-Panel Moment Conditions

Learn to formulate and interpret a difference-in-Hansen test for a selected subset of dynamic-panel instruments, including its degrees of freedom and limitations.

Advanced 10 min read

What You'll Learn

  • State the null hypothesis for a selected subset of dynamic-panel moment conditions.
  • Calculate a difference-in-Hansen statistic from nested Hansen tests.
  • Determine degrees of freedom from the number of additional independent moments.
  • Interpret test results without treating non-rejection as proof of instrument validity.
  • Explain why many instruments can weaken the diagnostic value of the test.

Why Test a Subset of Moment Conditions?

A dynamic-panel GMM specification may rely on several groups of moment conditions. For example, one group may use particular lagged values as instruments, while another group uses a different set of lags. A Hansen test of all overidentifying restrictions assesses the instrument set jointly. It does not, by itself, identify whether a particular subset is responsible for evidence against the specification.

A difference-in-Hansen test focuses on a selected subset by comparing a model using the full set of moments with a nested model that omits the subset under examination. The comparison asks whether adding those moments creates a statistically significant deterioration in the fit of the moment restrictions. Its interpretation is conditional: the moments retained in both models must themselves be valid for the subset test to have its intended meaning.

Definition: A difference-in-Hansen test (also called a C test) evaluates a selected subset of GMM moment conditions by comparing a full set of moments with a nested set that excludes the selected subset. Under the null, the tested subset is valid, conditional on the validity of the retained moments and the regularity conditions for the test.

Moment Sets and the Null Hypothesis

Let \(\theta\) denote the parameter vector in a dynamic-panel model, and let \(g_i(\theta)\) be the vector of moment functions for panel unit \(i\). The population moment condition is \(E[g_i(\theta_0)]=0\), where \(\theta_0\) is the parameter value being estimated. In a panel application, these moments encode restrictions involving the model's errors and instruments.

Partition the available moments into two sets. Call \(A\) the retained set and \(B\) the subset to be tested. The full specification uses \(A\cup B\); the nested specification uses only \(A\). The subset test's null hypothesis is that the moments in \(B\) are valid, given that the moments in \(A\) are valid. If the retained moments are invalid, a rejection cannot be attributed uniquely to \(B\), and a non-rejection does not establish that either set is valid.

For a Hansen test, the minimized GMM criterion is commonly written as \(J=N\bar g(\hat\theta)'\hat S^{-1}\bar g(\hat\theta)\), where \(\bar g(\hat\theta)\) is the sample average of the moment vector, \(\hat S\) estimates its covariance matrix, and \(N\) is the number of panel units. Under the null and standard large-\(N\), fixed-\(T\) regularity conditions, the Hansen statistic has an asymptotic chi-square distribution with degrees of freedom equal to the number of independent moment restrictions minus the number of estimated parameters. The subset test compares the corresponding overidentification tests for the nested moment sets.

Null and alternative: \(H_0\) states that the tested moments in \(B\) are valid, conditional on the validity of the retained moments in \(A\). \(H_a\) states that the tested subset is not valid under that maintained condition. Rejecting \(H_0\) is evidence against using the tested subset as specified; failing to reject is not proof of its validity.

Statistic, Degrees of Freedom, and Reference Distribution

Let \(J_{A\cup B}\) be the Hansen statistic for the full model and \(J_A\) the Hansen statistic for the nested model that excludes \(B\). The conventional difference statistic is

$$ C = J_{A\cup B}-J_A. $$

If the full and restricted specifications have the same structural parameters and the tested subset contributes \(q\) additional linearly independent moment restrictions, then under \(H_0\), \(C\) has an asymptotic chi-square distribution with \(q\) degrees of freedom. In the usual case where the two sets are nested without redundant moments, \(q\) is the number of moments added by \(B\). More generally, it is the difference in the ranks of the independent moment restrictions, not simply a count of columns in an instrument matrix.

The parameter count cancels in this degrees-of-freedom comparison when both specifications estimate the same parameter vector: if the full and restricted sets contain \(L_{A\cup B}\) and \(L_A\) independent moments and estimate \(k\) parameters in each, the difference is \((L_{A\cup B}-k)-(L_A-k)=L_{A\cup B}-L_A=q\). If the specifications differ in structural parameters or are not nested in the relevant moment restrictions, this simple degrees-of-freedom rule does not automatically apply.

Worked Example: Testing Three Added Moments

Suppose a hypothetical dynamic-panel analysis has a full-set Hansen statistic \(J_{A\cup B}=16.42\), while the nested model excluding the selected subset has \(J_A=9.82\). The subset contributes three independent moments. Test it at \(\alpha=0.05\).

Statistic. Subtract the nested statistic from the full statistic:

$$ C=16.42-9.82=6.60. $$

Reference distribution. The tested subset adds \(q=3\) independent moments, so compare \(6.60\) with a chi-square distribution with 3 degrees of freedom. Its upper-tail probability is \(P(\chi^2_3\geq 6.60)\approx 0.0858\).

Because \(0.0858>0.05\), this test does not reject \(H_0\) at the 5% level. The result is insufficient evidence against the three tested moments, conditional on the retained moments being valid. It does not show that the tested moments are certainly valid.

Why the Difference Has a Chi-Square Reference Distribution

The basic justification is that, after accounting for parameter estimation and the retained moments, the additional restrictions behave like \(q\) approximately standard normal components under the null. A quadratic measure of \(q\) independent standard normal components has a chi-square distribution with \(q\) degrees of freedom.

To see the quadratic-form result, suppose the adjusted, standardized components of the added moments are collected in a vector \(z\) of length \(q\). Under the null and the asymptotic approximation, \(z\) has a multivariate normal distribution with mean zero and identity covariance matrix. Thus \(z_1,\ldots,z_q\) are independent standard normal variables, and the relevant quadratic form is

$$ z'z=\sum_{j=1}^{q}z_j^2\sim\chi^2_q. $$

The difference between the nested and full overidentification criteria isolates this additional quadratic contribution when the test is constructed using the appropriate nested GMM comparison. This explains both why the degrees of freedom count the added independent restrictions and why the reference distribution is chi-square. It is an asymptotic result, not a claim that the statistic is exactly chi-square in every finite sample.

In applied work, use a difference test calculated with a compatible robust Hansen procedure. Simply subtracting two statistics based on incompatible weighting choices need not produce a valid C statistic. Separate finite-sample calculations can also yield a negative difference, even though the ideal nested quadratic-form comparison is nonnegative. A negative value is not evidence that the tested moments are unusually valid; it is a warning to check the statistic construction and the software's procedure rather than compare that value with a chi-square distribution.

Worked Applications

Worked Example: Rejecting a Two-Moment Subset

In a hypothetical analysis, the full model has \(J_{A\cup B}=24.70\), and the model omitting the tested subset has \(J_A=15.10\). The subset contains two independent moment restrictions. Use a 5% significance level.

Calculate the difference.

$$ C=24.70-15.10=9.60. $$

The degrees of freedom are \(q=2\), so the upper-tail probability is \(P(\chi^2_2\geq9.60)=\exp(-9.60/2)\approx0.00823\). Since \(0.00823<0.05\), reject \(H_0\). Subject to the validity of the retained moments and the test's assumptions, the data provide evidence against the tested subset. This finding does not establish which individual moment within that subset is invalid.

Worked Example: Counting Degrees of Freedom From Nested Sets

Suppose a hypothetical full instrument set contains 18 independent moment restrictions, while the nested set contains 14. Both models estimate the same parameter vector, and their Hansen statistics are \(J_{A\cup B}=31.40\) and \(J_A=26.00\). Determine the degrees of freedom and interpret the test at the 5% level.

Degrees of freedom. Four independent restrictions are added in the full model:

$$ q=(18-k)-(14-k)=18-14=4, $$

where \(k\) is the common number of estimated parameters.

Test statistic and probability.

$$ C=31.40-26.00=5.40,\qquad P(\chi^2_4\geq5.40)\approx0.2487. $$

Since \(0.2487>0.05\), do not reject the null that the four added moments are valid, conditional on the retained set. The difference in the number of independent moments, rather than the total number of parameters or the number of panel units, determines the reference degrees of freedom here.

Conditions and Interpretation in Dynamic Panels

The test's meaning depends on the design of the comparison. The full and nested models should represent the same structural specification and differ in the intended moment subset. The moments must be correctly specified, their relevant covariance matrix must be estimable, and the asymptotic approximation must be reasonable for the panel dimensions and instrument set. The moment restrictions must also have the required rank: duplicated or linearly dependent instruments do not add independent degrees of freedom.

In dynamic-panel applications, the subset may correspond to instruments based on a chosen group of lags or another clearly defined group of moment conditions. State exactly which moments are included in \(B\), which remain in \(A\), and what validity claim is being tested. A result should be reported with the statistic, degrees of freedom, p-value, significance level, and the conditional nature of the null. For instance: “The difference-in-Hansen test for the selected lag-based subset was \(C=6.60\) with 3 degrees of freedom (\(p=0.0858\)); the null was not rejected at 5%, conditional on the retained moments.”

This test addresses a different question from the Arellano–Bond serial-correlation tests: it evaluates selected moment restrictions, not serial correlation directly. It also does not test whether the instruments are strong or whether the estimated causal interpretation is justified. Those conclusions require other parts of the model assessment and substantive design.

Why Many Instruments Can Reduce Test Power

A difference-in-Hansen test can have low power when the instrument set is large relative to the information in the sample. With many moments, the estimated covariance matrix used in robust GMM can be imprecise or poorly conditioned. The fitted moments may also adapt closely to sample-specific noise, making invalid restrictions harder to distinguish from valid ones. Consequently, a non-rejection may be uninformative: it can reflect limited diagnostic power rather than persuasive evidence of validity.

The issue can affect both the full Hansen test and a subset difference test. A large instrument set can make the joint criterion appear comfortable even when some restrictions are questionable, while the difference statistic may struggle to isolate a problematic subset. Thus a high p-value should not be read as a certification of the instruments. Interpret it alongside the model's moment assumptions, the size and structure of the instrument set, and other diagnostics. In particular, report the precise subset tested; “the Hansen test passed” does not describe a subset test or its conditional null.

Common Mistakes

  • Reversing the subtraction. The conventional difference is \(J_{A\cup B}-J_A\), full set minus nested set. Reversing it changes the sign and does not yield the stated C statistic.
  • Using the wrong degrees of freedom. The degrees of freedom are the number of additional independent moment restrictions, not the full model's Hansen degrees of freedom and not automatically the raw number of instrument columns.
  • Claiming a non-rejection proves validity. A non-rejection means the test did not find sufficient evidence against the subset under its assumptions. Low power, especially with many instruments, may contribute to that result.
  • Ignoring the maintained moments. The tested subset is assessed conditional on the retained moments being valid. If those are invalid, the subset-test interpretation is compromised.
  • Subtracting incompatible statistics. A difference of separately reported numbers is not necessarily a valid robust C statistic if the underlying procedures are not compatible. Use a procedure designed for the nested test.
Key takeaway: A difference-in-Hansen test compares nested moment sets to assess a specified subset. Its chi-square degrees of freedom equal the number of added independent restrictions; its null is conditional on the retained moments being valid, and non-rejection is not proof of validity.

Check Your Understanding

Answer each question using the conditional interpretation of the test.

  1. A full model has \(J=20.8\) and a nested model has \(J=14.2\). The tested subset adds two independent moments. Calculate \(C\), state its reference distribution, and describe what additional information is needed to decide whether to reject.
  2. Why does the number of estimated parameters cancel from the degrees-of-freedom calculation when both nested models estimate the same parameter vector?
  3. What does a difference-in-Hansen rejection imply about the tested subset, and what maintained assumption is needed for that interpretation?
  4. Why is a negative difference between two separately reported Hansen statistics not evidence that a subset is especially valid?
  5. Explain one reason that a large instrument set can make a non-rejection of a subset test less reassuring.
Clinical Biostats