Sven Schreiber schrieb:
Hélio Guilherme schrieb:
> nulldata 1000
> confidence_lvl=0.05
> series rejected=0
> i=1
> loop 1000 --progressive --quiet
> genr a = 10*uniform()
> genr y = 1*a + normal()
> alpha = 0.99
> genr y = alpha*y(-1) + normal()
> adf 1 y --nc --quiet
> genr pv = $pvalue
> print pv
>
I suggest to move the print command out of the loop, it will slow things
down.
> genr rejected[i]=(pv>confidence_lvl)?1:0
>
I guess this should be < instead of >?
> i++
>
or loop for i=1..1000
> store coeffs.gdt pv
>
again, better process the results of the loop after the loop is finished
cheers,
sven
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users Thank you for the script and
hints, Helio and Sven.
I've got two questions left:
1. What is "?1:0" exactly doing?
2. Why is it not possible to set a sample smaller than the number of
loops any more? If I set nulldata 100 for loop 1000 I get the following
output: "Observation number out of bounds
'[i]': bad observation specifier
> genr rejected[i]=(pv<=confidence_lvl)?1:0"
Since I
want to study the sample properties of the ADF test this is not
quite useful :)
Cheers,
Artur