Hi,
Here is my proposal (please correct any errors), assuming that adf
does not produce variables for your purpose. Note that I am a beginner
at this :).
<script>
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
genr rejected[i]=(pv>confidence_lvl)?1:0
i++
store coeffs.gdt pv
endloop
printf "Count of rejected null hypothesis: %d\n", sum(rejected)
</script>
Bye,
Hélio
On Sat, Jan 2, 2010 at 7:43 PM, Artur T. <artur.tarassow(a)googlemail.com> wrote:
Hello,
I programmed the following loop and wanted to count how often the null
is rejected for the ADF test. Unfortunately I do not know whether there
is a simple function for this.
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
store coeffs.gdt pv
endloop
Do you know a solution for this?
Thanks in advance.
Artur
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users