I seek to improve the efficiency of performing ADF tests on group of variables.
I want the eviews to test each variable in the the group and report back t-stat or pvalue (if possible) in a matrix corresponding to the variable name.
There would be two ADF tests: (1) including constant and (2) constant and trend.
Hence there would be a 2x6 matrix.
Currently my code is as follows, and please tell me where it's wrong with the necessary adjustments.
Code: Select all
group unit_root x1 x2 x3 x4 x5 x6
table(6,6) unit_root_results
for !i=1 to unit_root.@count
%name = unit_root.@seriesname(!i)
uroot(adf, const, dif=0, save=root_c) {%name}
uroot(adf,const,trend, dif=0, save=root_c) {%name}
unit_root_results(1,1+!i)=%name
next
Thanks.