Zivot-Andrews Unit Root Test

For posting your own programs to share with others

Moderators: EViews Gareth, EViews Moderator

neverhood
Posts: 3
Joined: Sat Mar 06, 2010 8:39 pm

Re: Zivot-Andrews Unit Root Test

Postby neverhood » Sat Mar 06, 2010 8:45 pm

Thanks for the code trubador. I've got a pretty low level question. How do you tell eviews to run program mode A B or C, what do you have to type in the program arguments box?

Cheers

disbudak
Posts: 3
Joined: Wed Jun 23, 2010 7:03 am

Re: Zivot-Andrews Unit Root Test

Postby disbudak » Wed Jun 23, 2010 7:17 am

I have the same question. This code gives the result for model C. How do we get the result for model A.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11365
Joined: Tue Sep 16, 2008 5:38 pm

Re: Zivot-Andrews Unit Root Test

Postby EViews Gareth » Wed Jun 23, 2010 8:10 am

The code makes it pretty clear - you enter the model you want as the second argument.
Follow us on Twitter @IHSEViews

disbudak
Posts: 3
Joined: Wed Jun 23, 2010 7:03 am

Re: Zivot-Andrews Unit Root Test

Postby disbudak » Wed Jun 23, 2010 1:32 pm

thank you very much. I could not notice that argument. best regards

snax
Posts: 1
Joined: Tue Jul 13, 2010 7:33 am

Re: Zivot-Andrews Unit Root Test

Postby snax » Tue Jul 13, 2010 7:47 am

I've been testing the zauroot code against a large range of timeseries. All of them indicate a break in the trend and intercept. Does anyone have an example file where there is no break (or a simulation process)? Or am I misunderstanding something at a more basic level? Thanks

malikbensafta
Posts: 1
Joined: Sun Sep 19, 2010 4:25 am

Re: Zivot-Andrews Unit Root Test

Postby malikbensafta » Sun Sep 19, 2010 4:35 am

Hello
Could some one help me about zivot andrews

when executing, an error message ..No Upper define !

What matter?

Hurlstrino
Posts: 5
Joined: Sun Nov 14, 2010 9:34 am

Re: Zivot-Andrews Unit Root Test

Postby Hurlstrino » Mon Nov 15, 2010 4:12 am

Hi,

I get the following error.

"Is not defined or is an illegal command in "EQUATION TEMP.LS DY (Y-1) C @ TREND DY(-1 TO -4)".


Any ideas ?

I am running Eviews 7.

Thanks

Hurlstrino
Posts: 5
Joined: Sun Nov 14, 2010 9:34 am

Re: Zivot-Andrews Unit Root Test

Postby Hurlstrino » Mon Nov 15, 2010 5:21 am

Hurlstrino wrote:Hi,

I get the following error.

"Is not defined or is an illegal command in "EQUATION TEMP.LS DY (Y-1) C @ TREND DY(-1 TO -4)".


Any ideas ?

I am running Eviews 7.

Thanks



Ok, I ran the routine for the older versions of Eviews to see what happens , and now I get an error saying

"Insufficient number of observations in "EQUATION TEMPL.LS Y(-1) C @TREND (@TREND>17-2) (@TREND>17-2)*(@TREND-17+2 DY(-1 TO -3)"

trubador
Did you use forum search?
Posts: 1518
Joined: Thu Nov 20, 2008 12:04 pm

Re: Zivot-Andrews Unit Root Test

Postby trubador » Mon Nov 15, 2010 7:02 am

I do not think it is a version related issue.
malikbensafta wrote:"Is not defined or is an illegal command in "EQUATION TEMP.LS DY (Y-1) C @ TREND DY(-1 TO -4)"

You cannot put a space between @ and TREND. Moreover, (Y-1) should be replaced with Y(-1). Please do not change any of the structural parts of the subroutine.

Hurlstrino wrote:"Insufficient number of observations in "EQUATION TEMPL.LS Y(-1) C @TREND (@TREND>17-2) (@TREND>17-2)*(@TREND-17+2 DY(-1 TO -3)"

Here, the message is clear: You do not have enough observations to carry out the routine. You can lower the value of trimming parameter or better yet, increase the number of observations.

Hurlstrino
Posts: 5
Joined: Sun Nov 14, 2010 9:34 am

Re: Zivot-Andrews Unit Root Test

Postby Hurlstrino » Mon Nov 15, 2010 7:42 am

If I reduce the trimming, I get a singular matrix.

Do you have any other suggestions please, or would you mind taking a look at my data for me ?

maragloria
Posts: 82
Joined: Tue Jun 29, 2010 7:09 am

Re: Zivot-Andrews Unit Root Test

Postby maragloria » Wed Jan 05, 2011 10:55 am

I've posted this question on the Econometric Discussions forum but I am not sure it belongs there so I am posting it again here. It is about interpreting the results of Zivot-Andrews Unit Root Test.

I ran the routine "Zivot-Andrews Unit Root Test"

Code: Select all

call zivot(y,"C",4)
to perform a unit root test with trend break and I would like to know how to interpret the results.

From the equation “ZA” I get the following results:

Dependent Variable: DY
Method: Least Squares
Date: 01/04/11 Time: 16:42
Sample (adjusted): 1982Q2 2010Q1
Included observations: 112 after adjustments

Variable Coefficient std. Error t-Statistic Prob.

E_POP_RT(-1) -0.006628 0.001692 -3.916339 0.0002
C 0.062132 0.015577 3.988797 0.0001
@TREND 0.000272 8.29E-05 3.281443 0.0014
DU 0.001541 0.000606 2.541795 0.0125
DT -5.38E-05 3.49E-05 -1.541206 0.1263
DY(-1) 1.995009 0.088271 22.60086 0.0000
DY(-2) -1.078224 0.208280 -5.176808 0.0000
DY(-3) -0.295512 0.208189 -1.419440 0.1588
DY(-4) 0.391776 0.089783 4.363594 0.0000

How do I test for the unit root? Should I test whether or not the coefficient of e_pop_rt(-1) is equal to 1?

Thanks,

Mara

maragloria
Posts: 82
Joined: Tue Jun 29, 2010 7:09 am

Re: Zivot-Andrews Unit Root Test

Postby maragloria » Thu Jan 06, 2011 7:52 am

Hi,

I just realized you're running the regression using the 1st difference of the series Y. So in this case, to interpret the results I just use the t-stat of the coefficient Y(-1) to test for the null that this coefficient is equal to zero (using the critical values posted previously). Is this correct?

I was confusing your test with the one from Vogelsang and Perron (1998).

Thanks,

Mara

raquelopez
Posts: 8
Joined: Fri Apr 01, 2011 1:42 am

Re: Zivot-Andrews Unit Root Test

Postby raquelopez » Sat May 07, 2011 3:52 am

Hi,
Thank for such useful tool! I have a question. Could I use the bic criteria instead of the aic one by replacing "min_aic" by "min_bic" in the subroutine?
Thank you,
Raquel

trubador
Did you use forum search?
Posts: 1518
Joined: Thu Nov 20, 2008 12:04 pm

Re: Zivot-Andrews Unit Root Test

Postby trubador » Mon May 09, 2011 1:46 am

raquelopez wrote:Could I use the bic criteria instead of the aic one by replacing "min_aic" by "min_bic" in the subroutine?

No, you have to change more than that. You need to make following modifications to relevant parts of the code:

...
!min_bic = !bic0

for !lag=maxlag to 1 step -1
equation temp.ls dy y(-1) c @trend dy(-1 to -!lag)
!aic = log(temp.@ssr/!nobs)+2*(temp.@ncoef/!nobs)
!bic = log(temp.@ssr/!nobs)+log(!nobs)*(temp.@ncoef/!nobs)
if !bic < !min_bic then
!min_bic = !bic
!best_lag = !lag
else if !min_bic = !bic0 then

!best_lag =0
endif
endif
next
...

vanessa14
Posts: 7
Joined: Sun Aug 05, 2012 8:40 pm

Re: Zivot-Andrews Unit Root Test

Postby vanessa14 » Tue Aug 14, 2012 4:24 pm

I'm getting the message: "y is not defined in "call zivot(y,"C",4)"

Please, what can I do?

Vanessa


Return to “Program Repository”

Who is online

Users browsing this forum: No registered users and 2 guests