Dear list:Probably this message shoud be better addressed to a Stata list than to this one. However, I usually use Gretl for my estimations and probably somebody in the list has had the same issue and could be of interest of other Gretl users.
I know that estimations using different statistical packages usually should lead to different results due to different setting defaults, algorithms used, etc.
Recently, I have been introduced in dynamic panel data model. As usual, I first tried Gretl to do my estimations.
The question is that I'm trying to compare the results in gretl and Stata for a dynamic panel data model on the same dataset using the sys-gmm estimator of Blundell and Bond (1998).
I have tried to do it in Gretl using the gretl GUI with 1 step estimator, no time dummies and including the equation in levels as follows (command log):
dpanel 1 ; Afiliados 0 Coast Aerop70 Walk Pmain Dens DPrs11_2 --system \
--dpdstyle
where most of the explanatory variables Coast, Aerop70, Walk, Pmain and Dprs11_2 are time invariant.
For this setting I get the following coefficients:
Model 2: 1-step dynamic panel, using 680 observations
Included 136 cross-sectional units
Including equations in levels
H-matrix as per Ox/DPD
Dependent variable: Afiliados
coefficient std. error z p-value
--------------------------------------------------------------
Afiliados(-1) 1.04336 0.00244793 426.2 0.0000 ***
const 100.007 60.8670 1.643 0.1004
Coast 1.13130 0.554658 2.040 0.0414 **
Aerop70 16.3194 21.2904 0.7665 0.4434
Walk −1.73009 6.48870 −0.2666 0.7898
Pmain −2.92214 1.00457 −2.909 0.0036 ***
Dens −0.0164583 0.0129767 −1.268 0.2047
DPrs11_2 −64.0195 31.7635 −2.016 0.0439 **
Sum squared resid 57679996 S.E. of regression 292.9733
Number of instruments = 21
Test for AR(1) errors: z = -3.63181 [0.0003]
Test for AR(2) errors: z = 0.0197901 [0.9842]
Sargan over-identification test: Chi-square(13) = 163.021 [0.0000]
Wald (joint) test: Chi-square(7) = 414893 [0.0000]
When I try to estimate the model in Stata using the following command:
. xtdpdsys Afiliados Coast Aerop70 Walk Pmain Dens residential, lags(1) artests(2)
I get the following result:
note: Coast dropped from div() because of collinearity
note: Aerop70 dropped from div() because of collinearity
note: Walk dropped from div() because of collinearity
note: Pmain dropped from div() because of collinearity
note: residential dropped from div() because of collinearity
System dynamic panel-data estimation Number of obs = 680
Group variable: Municipio Number of groups = 136
Time variable: Year
Obs per group:
min = 5
avg = 5
max = 5
Number of instruments = 16 Wald chi2(6) = 708786.67
Prob > chi2 = 0.0000
One-step results
------------------------------------------------------------------------------
Afiliados | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
Afiliados |
L1. | .9912949 .0126633 78.28 0.000 .9664753 1.016114
|
Coast | 188.1017 38.27705 4.91 0.000 113.08 263.1233
Aerop70 | 0 (omitted)
Walk | -503.8206 395.3154 -1.27 0.202 -1278.624 270.9833
Pmain | 293.8372 82.27726 3.57 0.000 132.5768 455.0977
Dens | -.8086489 .5405354 -1.50 0.135 -1.868079 .250781
DPrs11_2l | 4815.363 1926.302 2.50 0.012 1039.88 8590.846
_cons | -16164.83 3962.049 -4.08 0.000 -23930.31 -8399.358
------------------------------------------------------------------------------
Instruments for differenced equation
GMM-type: L(2/.).Afiliados
Standard: D.Dens
Instruments for level equation
GMM-type: LD.Afiliados
Standard: _cons
As it can be seen, the number of observations and entities are the same. However, the number of instruments is different relating to the Gretl output (probably some of the defaults have different behaviour) but, the magnitude of coefficients is very different, and what to me is most worrying is that in Gretl there is a coefficient for the variable "Aerop70", however Stata drops this variable probably due to the collinearity issues with no coefficient estimated.
Somebody has a clue on how to replicate the Gretl setting for this model in Stata? It is in the
xtdpdsys command where it should be replicated or in the other command (xtabond2) that I have seen that somebody uses to estimate this kind of models.
Thanks in advance and sorry for inconvenience.
José Perles
University of Alicante
Spain.