ZivotAndrews Unit Root Test
Moderators: EViews Gareth, EViews Moderator
Re: ZivotAndrews Unit Root Test
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
Cheers
Re: ZivotAndrews Unit Root Test
I have the same question. This code gives the result for model C. How do we get the result for model A.

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12242
 Joined: Tue Sep 16, 2008 5:38 pm
Re: ZivotAndrews Unit Root Test
The code makes it pretty clear  you enter the model you want as the second argument.
Follow us on Twitter @IHSEViews
Re: ZivotAndrews Unit Root Test
thank you very much. I could not notice that argument. best regards
Re: ZivotAndrews Unit Root Test
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

 Posts: 1
 Joined: Sun Sep 19, 2010 4:25 am
Re: ZivotAndrews Unit Root Test
Hello
Could some one help me about zivot andrews
when executing, an error message ..No Upper define !
What matter?
Could some one help me about zivot andrews
when executing, an error message ..No Upper define !
What matter?

 Posts: 5
 Joined: Sun Nov 14, 2010 9:34 am
Re: ZivotAndrews Unit Root Test
Hi,
I get the following error.
"Is not defined or is an illegal command in "EQUATION TEMP.LS DY (Y1) C @ TREND DY(1 TO 4)".
Any ideas ?
I am running Eviews 7.
Thanks
I get the following error.
"Is not defined or is an illegal command in "EQUATION TEMP.LS DY (Y1) C @ TREND DY(1 TO 4)".
Any ideas ?
I am running Eviews 7.
Thanks

 Posts: 5
 Joined: Sun Nov 14, 2010 9:34 am
Re: ZivotAndrews Unit Root Test
Hurlstrino wrote:Hi,
I get the following error.
"Is not defined or is an illegal command in "EQUATION TEMP.LS DY (Y1) 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>172) (@TREND>172)*(@TREND17+2 DY(1 TO 3)"
Re: ZivotAndrews Unit Root Test
I do not think it is a version related issue.
You cannot put a space between @ and TREND. Moreover, (Y1) should be replaced with Y(1). Please do not change any of the structural parts of the subroutine.
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.
malikbensafta wrote:"Is not defined or is an illegal command in "EQUATION TEMP.LS DY (Y1) C @ TREND DY(1 TO 4)"
You cannot put a space between @ and TREND. Moreover, (Y1) 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>172) (@TREND>172)*(@TREND17+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.

 Posts: 5
 Joined: Sun Nov 14, 2010 9:34 am
Re: ZivotAndrews Unit Root Test
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 ?
Do you have any other suggestions please, or would you mind taking a look at my data for me ?

 Posts: 82
 Joined: Tue Jun 29, 2010 7:09 am
Re: ZivotAndrews Unit Root Test
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 ZivotAndrews Unit Root Test.
I ran the routine "ZivotAndrews Unit Root Test" 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 tStatistic 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.29E05 3.281443 0.0014
DU 0.001541 0.000606 2.541795 0.0125
DT 5.38E05 3.49E05 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
I ran the routine "ZivotAndrews Unit Root Test"
Code: Select all
call zivot(y,"C",4)
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 tStatistic 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.29E05 3.281443 0.0014
DU 0.001541 0.000606 2.541795 0.0125
DT 5.38E05 3.49E05 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

 Posts: 82
 Joined: Tue Jun 29, 2010 7:09 am
Re: ZivotAndrews Unit Root Test
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 tstat 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
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 tstat 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

 Posts: 8
 Joined: Fri Apr 01, 2011 1:42 am
Re: ZivotAndrews Unit Root Test
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
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
Re: ZivotAndrews Unit Root Test
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
...
Re: ZivotAndrews Unit Root Test
I'm getting the message: "y is not defined in "call zivot(y,"C",4)"
Please, what can I do?
Vanessa
Please, what can I do?
Vanessa
Return to “Program Repository”
Who is online
Users browsing this forum: No registered users and 1 guest