Artur T. schrieb:
Sven Schreiber schrieb:
> Artur T. schrieb:
>
>> Allin Cottrell schrieb:
>>
>>>>
>>> <script>
>>> nulldata 100 # or whatever
>>> scalar alpha = 0.99
>>> scalar level = 0.05 # or whatever
>>> scalar reject = 0
>>> scalar replics = 1000
>>> loop replics --progressive --quiet
>>> genr a = 10*uniform()
>>> genr y = 1*a + normal()
>>> genr y = alpha*y(-1) + normal()
>>> adf 1 y --nc --quiet
>>> genr pv = $pvalue
>>> reject += (pv < level)
>>> print pv
>>> store pvals.gdt pv
>>> endloop
>>>
>>> printf "rejections = %d (%.2f%%)\n", reject, 100*reject/replics
>>> </script>
>>>
>>> >From running this a few times, it looks as if this test is
>>> over-rejecting quite seriously (if I'm interpreting the results
>>> correctly). I'll look into this further.
>>>
>>
>> @Allin
>> I was also surprised how often the null is rejected. But actually, as is
>> known, the result depends heavily on the number of observations and how
>> close %alpha is to the unit.
>>
>>
> What actually are you trying to analyze? Are you aware that the adf test
> with --nc is mis-specified, or is this the whole point?
>
>
Yes, actually I wanted to test the validity of the test under
misspecification, sample size and structural breaks. The code was only
one part of the total story.
still it's a strange setup;
AFAICS the lines
>>> genr a = 10*uniform()
>>> genr y = 1*a + normal()
only determine the initial condition of y
at t=0, because you're
overwriting all other values of y in the following line anyway. The
influence of "unusual" initial conditions on unit root tests is known
and there is a literature about that. IMO that would explain the
"overrejection" that you're seeing. BTW, here the DGP does not have a
unit root so we all should be happy that the test is rejecting :-)
cheers,
sven