Save the Chi-square value of a Wald test
Posted: Mon Aug 15, 2016 12:09 pm
Hi! I was estimating multiple equations and perform Wald tests on them. There are 40 equations in total, thus 40 Chi-square values. Is there a way to automatically store these values, preferably into one table? I've searched the help documents for Wald test, but didn't find anything related to how to retrieve the Chi-square value. I think I need something before the last 2 "next" in my code...
Thanks!
Thanks!
Code: Select all
for %y y1 y2 y3 y4 y5 y6 y7 y8
for !n=1 to 5
%reg=""
%thresh="t1 t2 t3 t4 t5"
for !power=0 to 3
equation lt_!n_{%y}
for !lnlag=1 to 7
%new=@word(%thresh,!n)
%reg=%reg+%y+"("+@str(-!lnlag)+")"+"*"+%new+"^"+@str(!power)+" "
next
next
lt_!n_{%y}.ls {%y} c {%reg}
'Wald test
%wald=""
for !m=9 to 29
%wald=%wald+"c("+@str(!m)+")="
next
lt_!n_{%y}.wald {%wald}0
next
next