Page 1 of 1

How to run a ADF unit root test for multiple series

Posted: Thu Oct 23, 2008 12:31 pm
by xorlosch
I have a workfile with around 100 series imported. For all these series I would like to run an ADF unit root test for the levels and first differences and store the series name and the t-values in a table. The series names do not have a unique pattern. Is this possible to do without the interface? Thanks for your help.

Re: How to run a ADF unit root test for multiple series

Posted: Thu Oct 23, 2008 12:34 pm
by EViews Gareth
Best bet is to put your series into a group and then write a for loop that loops through the members of the group, performing the test on each one as it goes.

Re: How to run a ADF unit root test for multiple series

Posted: Fri Oct 24, 2008 2:58 am
by xorlosch
My code looks like this at the moment:

Code: Select all

group g * 'put every series in the workfile into a group table (50,50) ADF for !i=1 to g.@count 'loop through every series in the first group %name = g.@seriesname(!i) 'grab the current series name uroot(adf, const, dif=0,save=level1) {%name} ADF(1,1+!i)=%name ADF(2, 1+!i)= level1(3,1)' uroot(adf, trend, dif=0,save=level2) {%name} ADF(3, 1+!i)= level2(3,1) next
I have two problems. First, I would like to exclude c and -resid from my group selction. Second, I would love to save the t-values of the Trend term in my table as well.

Re: How to run a ADF unit root test for multiple series

Posted: Fri Oct 24, 2008 7:10 am
by EViews Gareth
Code looks good so far.

C won't get added to your group (since it isn't a series). You can remove resid from your group with the drop command:

Code: Select all

group g * g.drop resid
I believe the only way to save the t-values is to freeze the uroot results into a table, then grab the numbers from that table. Cumbersome, but it should work.

Re: How to run a ADF unit root test for multiple series

Posted: Fri Oct 24, 2008 9:10 am
by xorlosch
Thanks for your help. It worked out well.

Re: How to run a ADF unit root test for multiple series

Posted: Fri Oct 24, 2008 10:32 am
by EViews Gareth
Great.

As an aside, you don't need to create the ADF table as 50 by 50. EViews tables will resize automatically.

Thus you can just create the table without sizing it, then everytime you put something into a row or column, EViews will resize the table if that row or column doesn't already exist.

Re: How to run a ADF unit root test for multiple series

Posted: Mon May 16, 2011 2:21 am
by seg_b
Hi!

this topic was very helpful to me. But I used to program with SAS and I have to program a ADF unit root test for multiple series with Eviews.
So, my problem is I don't know how to freeze the uroot results into a table and grab the numbers from the table...

Could you help me, please.

Seg_b

Re: How to run a ADF unit root test for multiple series

Posted: Mon May 16, 2011 3:11 am
by trubador
So, my problem is I don't know how to freeze the uroot results into a table and grab the numbers from the table...
Then you will find the following link very useful: http://forums.eviews.com/viewtopic.php?f=5&t=18

Re: How to run a ADF unit root test for multiple series

Posted: Wed May 18, 2011 5:48 am
by seg_b
thanks a lot :)

Re: How to run a ADF unit root test for multiple series

Posted: Wed May 25, 2011 1:41 am
by seg_b
Hi,

I used this topic to do my own programm to run a ADF unit root test for multiple series.
I just want to know how I can get the sum squared resid at every test.
I need it to run the F-test (if b=0 and if c=0)...

can someone help me again?
thanks.

Re: How to run a ADF unit root test for multiple series

Posted: Tue Aug 12, 2014 9:36 am
by EViews Glenn
Perform the Panel Unit Root test with the Im-Pesaran-Shin method, which will show you the intermediate results for each cross section.

Re: How to run a ADF unit root test for multiple series

Posted: Tue Aug 12, 2014 9:05 pm
by EViews Gareth
It looks, in the workfile you posted at least, as though firms are your cross-sections.

Re: How to run a ADF unit root test for multiple series

Posted: Wed Aug 13, 2014 7:46 am
by EViews Gareth
Perform the Panel Unit Root test with the Im-Pesaran-Shin method, which will show you the intermediate results for each cross section (firm).