Am 13.07.19 um 23:12 schrieb Allin Cottrell:
On Sat, 13 Jul 2019, Artur Tarassow wrote:
> Am 12.07.19 um 22:11 schrieb Allin Cottrell:
>> On Fri, 12 Jul 2019, Sven Schreiber wrote:
>>
>>> Am 12.07.2019 um 20:05 schrieb Allin Cottrell:
>>>
>>> Right. The point is more pragmatic in a programming context, as
>>> opposed
>>> to interactive use: We came across it with the wooldridge_test_serial
>>> package. It's just a matter of how to handle the strange corner
>>> case. As
>>> things stand, gretl throws an error which interrupts everything. So
>>> the
>>> authors would have to use 'catch' to continue gracefully after that
>>> error.
>>
>> Since wooldridge_test_serial consists of a single, quite simple
>> function, it seems that it could be turned into a built-in test if
>> we think that's worthwhile.
>
> Good idea, Allin! In case it does not mean too much work for you.
That's now done in git. "modtest --autocorr" (or the
"Autocorrelation"
menu item under Tests in the model window) gives
the Wooldridge test, provided the estimator is fixed or random effects
and the panel has a time-series length of at least 3.
Hi Allin, thanks for implementing this test. I've realized that your
results differ from the package's one. I think the reasons are:
1) The wooldridge_test_serial() function does currently not work
correctly in case an intercept is passed as an regressor as it is
automatically omitted due to the "diff" command -- this is not correctly
controlled in the package. You can try this and check the print-out:
<hansl>
open abdata.gdt
list X = const n k
matrix M = wooldridge_test_serial(ys,X)
print M
</hansl>
2) I've corrected issue (1) such that the point estimates of the
"First-Differenced equation" and the auxiliary regression on the
residuals are equal to the one gretl produces. However, the standard
errors are different -- I don't know why.
3) The degrees of freedom used for computing the test statistics also
differ. The wooldridge_test_serial() function, for instance, applies the
$df accessor which accesses the number of cross-sectional units after
the ols command given a panel data set. Unfortunately, I don't have
access to Wooldridge's original paper to cross-check what is should be
used. Maybe Giuseppe can comment this.
I think this needs being clarified to make sure the now built-in test
works correctly.
Thanks,
Artur