I am trying to do a simulation to test the power of the ADF test for near unit root process, so basically simulate a number of AR(1) processes and test them with ADF. Almost everything seem to work, but as a last step I want to gather the t-statistics, frozen into tables, into a vector and I cant figure out a way to make this work. There is no error messages but the vector only contains one value, and its not one of the t-values. What am I doing wrong?
Thanks
Here is the code so far:
Code: Select all
wf create u 1000
'AR parameter
!phi1=0.9
!sigma2 = 1
for !i=1 to 5
smpl @first @first
series y{!i}=0
smpl 2 @last
series y{!i}=!phi1*y{!i}(-1)+nrnd*@sqrt(!sigma2)
smpl 900 @last
y{!i}.uroot(trend, info=aic)
freeze(tabl{!i}) y{!i}.uroot
next
for !i=1 to 5
vector t=@val(tabl{!i}(7,5))
next