Dear Concerned
I have monthly stock returns series of 652 firms for 12 years and i need to check stationarity of all these stock return series individually. I run the following program to perform ADF test for each of the series using LOOP
For !i= 1 to 652
uroot(adf, const, dif=0) y{!i}
next
But when i run this program, it shows error. Please help me out to resolve it.
ADF test for multiple timeseries
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: ADF test for multiple timeseries
Hard to know what is causing the error without knowing what the error is.
Re: ADF test for multiple timeseries
It is showing the error message:
(adf, const, dif=0) is not defined in "uroot(adf, const, dif=0) y1"
Please help.
(adf, const, dif=0) is not defined in "uroot(adf, const, dif=0) y1"
Please help.
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: ADF test for multiple timeseries
I can't replicate this. Are you sure you don't have a space between the uroot command and the options "("?
Re: ADF test for multiple timeseries
Thank you very much for the quick reply. The error was because of the space after uroot. i have corrected it.
freezing results in ADF test for multiple timeseries
Hi,
I am new to this forum (and to Eviews programming! I do that in other software), but I need it now so I hope that you can help me. Let me explain.
I have few series on which I need to run ADF test (on levels using automatic lag selection), then I need to store t- and p-values by using frozen tables; but unfortunately I get an error like "Illegal lag or index specification for UROOT(...) in "FREEZE(TAB, MODE=OVERWRITE) UROOT...". I tried to specify lags, info criteria, and maxlag without success.
I hope that you can help me! Thanks in advance. The code is attached, any comments are very welcome!
I am new to this forum (and to Eviews programming! I do that in other software), but I need it now so I hope that you can help me. Let me explain.
I have few series on which I need to run ADF test (on levels using automatic lag selection), then I need to store t- and p-values by using frozen tables; but unfortunately I get an error like "Illegal lag or index specification for UROOT(...) in "FREEZE(TAB, MODE=OVERWRITE) UROOT...". I tried to specify lags, info criteria, and maxlag without success.
I hope that you can help me! Thanks in advance. The code is attached, any comments are very welcome!
Code: Select all
group g mg ms mb m1
table urtests
smpl @all
'loop through every series in the group
for !i=1 to g.@count
'grab the current series name
%name = g.@seriesname(!i)
'utests for all group members frozen in a tab
freeze(tab, mode=overwrite) uroot(adf, trend, dif=0) {%name}
'save t-values and corresponding p-values in the corresponding frozen table,
scalar t_value = @val(tab(7,4))
scalar p_value = @val(tab(7,5))
urtests(1+!i,1)=%name
urtests(1+!i,2)=scalar t_value
urtests(1+!i,3)= scalar p_value
next
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: ADF test for multiple timeseries
Code: Select all
freeze(tab, mode=overwrite) {%name}.uroot(adf, trend, dif=0)
Re: ADF test for multiple timeseries
Many thanks! Incidentally: no need to write "scalar" when filling table cells.
Many thanks again for the prompt replay.
Many thanks again for the prompt replay.
Who is online
Users browsing this forum: No registered users and 2 guests
