I have 52 series for which I want to run a unit root test and then store the p-values in a 52,1matrix. My dependent variables are placed in a group, ys.
My code for the unit root test procedure is:
Code: Select all
matrix (52,1) ys_adf
for !i=1 to ys.@count
freeze(adftable) ys.uroot(adf, trend, info=sic)
ys_adf= @val(adftable(7,5))
d adftable
next
I have managed to write programs that performs and stores the p-values for an LM-test and for a Whites test. The P-value positions were (4,5) and (3,5) respectively. But for the unit root tests it seems more tricky.
I would be very thankful if anyone knows where the p-values are located in the unit root output? Is there a guide somewhere that states where each statistic is stored in a specific output table?
Also, if there is something wrong with the code I would be thankful for corrections and if someone has a working program for this I would be very happy.
Thanks a lot in advance/ Marcus
