Hi,

I'm still struggling with the dpanel methodology and the comparison of results to e.g. Stata.
First, the Sargan test statistics reported by GRETL are equivalent to the ones of Arellano and Bond (1991) Sargan tests.

The assertion that the Sargan test of GRETL is the Hansen test in xtabond seems not to be true for xtabond2.
GRETL values are always closer to the Sargan tests of Roodman reported in Roodman (2006). What is the Hansen test then?

In Baltagi (2005) I found a xtabond output. Here the results for GMM-Diff one-step estimates are the same as of gretl and the Sargan test fits too (note, here is only a Sargan test is reported in the output).
Strange in this comparison: In GRETL the two-step estimators are far away from the one-step coefficients and completely different to the ones reported in Baltagi (p. 157). The data is available under http://www.wiley.com//legacy/wileychi/baltagi/datasets.html
It's the 5th dataset. on this page.

Another questions is how to perform the Difference-in-Sargan/Hansen tests in GRETL (as reported in xtabond2)?

Cheers
Leon

<hansl>
open abdata.gdt

# comparison to Roodman (2006) Stata output
# regressors and time-dummies count as instruments
genr timedum
list tdums = dt_3 dt_4 dt_5 dt_6 dt_7 dt_8

# Roodman (2006) p. 26ff.
dpanel 2 ; n w w(-1) k k(-1) k(-2) ys ys(-1) ys(-2) tdums
/* GRETL Sargan: 65.8181
Stata Sargan: 67.59
Stata Hansen: 31.38 */

# with endogenous refressors wages and capital
dpanel 2 ; n w w(-1) k k(-1) k(-2) ys ys(-1) ys(-2) tdums ; \
GMM(n,2,9) GMM(w,2,9) GMM(k,2,9) ys ys(-1) ys(-2) tdums
/* GRETL Sargan: 117.457
Stata Sargan: 120.62
Stata Hansen: 73.72 */

<hansl>

19.05.2013 18:19, Pindar:
Hi,

I'm still trying to get a feeling for the dpanel gmm estimators.
When estimating this xtabond2 statement from Roodman (2006/2008) for abdata.gdt
"xtabond2 n L.n L(0/1).(w k) yr*, gmmstyle(L.(n w k)) ivstyle(yr*, equation(level)) robust small"
    by
<hansl>
open abdata.gdt
dpanel 1; n const w w(-1) k k(-1) ; \
  GMM(n,2,8) GMM(w,2,8) GMM(k,2,8) \
  GMMlevel(w,1,1) GMMlevel(k,1,1) --time --sys
<hansl>

I came across a question concerning the Sargan/Hansen test of overid. restrictions.
In the gretl-guide on p.152 it is stated that "Specifically, xtabond2 computes both a “Sargan
test” and a “Hansen test” for overidentification, but what it calls the Hansen test is what DPD and
gretl call the Sargan test."

The Hansen test in this example does not reject the validity of the instruments while the Sargan does.

"Sargan test of overid. restrictions: chi2(100) = 186.90 Prob > chi2 = 0.000
(Not robust, but not weakened by many instruments.)
Hansen test of overid. restrictions: chi2(100) = 110.70 Prob > chi2 = 0.218
(Robust, but can be weakened by many instruments.)"

In gretl output however the result of the Sargan test is and not the Hansen test :
"Sargan over-identification test: Chi-square(100) = 154.808 [0.0004]"

That's was quite a surprise for me.
Perhaps it's because the test statistic is not the same and it's really the Hansen test (cos I believe in what u documented :-)), but why then such drastic differences?

Cheers
Leon