Testing for unit root using DF-GLS

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

agy038
Posts: 5
Joined: Wed Aug 27, 2014 12:56 am

Testing for unit root using DF-GLS

Postby agy038 » Fri Oct 10, 2014 5:36 am

Hi to all,

I have a series which consist of 109 observations and I am trying to test for stationary by using DF-GLS. Even though Eviews allows me to compute the GLS-detrended Dickey-Fuller (Elliot, Rothenberg, and Stock, 1996) test, I want to calculate it myself just to make sure that I understand how it works and then compare it to the results that Eviews provides.But the problem is that for some reason I cannot reach the same results that Eviews provides.

Below is the list of the commands that I use.If anyone tells me where I messed up, it would be highly appreciated.

Some further info: ipi stands for industrial production index which I am testing for stationarity.exogenous variables are constant and linear trend.Lag length is not important because that is not the point.Sample range is 2002m01-2011m01.

scalar alpha=1-13.5/109
series ygls=ipi-alpha*ipi(-1) ==> After this command I am opening ygls series and making the first ygls value -which is NA- same as the first ipi value.
series x1t=1-alpha ==> and make X11=1
series t=@trend(2002m01,1)
series x2t=t-alpha*(t-1)
ls ygls x1t x2t

The residuals that I get from the upper regression (ls ygls x1t x2t) are not the same as I get from Eviews's DF-GLS test.If it was the same, what I was going to do is just to make a Dickey-Fuller test -no constant and trend- on the residuals and then that would have been it.

Thanks in advance anyone who contributes to the topic.

EViews Glenn
EViews Developer
Posts: 2672
Joined: Wed Oct 15, 2008 9:17 am

Re: Testing for unit root using DF-GLS

Postby EViews Glenn » Sun Oct 12, 2014 8:16 am

Can you post your workfile?

hanan
Posts: 2
Joined: Sun Sep 25, 2016 3:37 pm

Re: Testing for unit root using DF-GLS

Postby hanan » Mon Nov 14, 2016 6:15 am

would you please state how to conduct DF-GLS in eviews 9

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

Re: Testing for unit root using DF-GLS

Postby EViews Gareth » Mon Nov 14, 2016 7:34 am

Follow us on Twitter @IHSEViews

gonrm92
Posts: 1
Joined: Tue Aug 22, 2017 10:06 pm

Re: Testing for unit root using DF-GLS

Postby gonrm92 » Wed Aug 23, 2017 2:37 pm

Hi agy038,

First of all i have to thank you because i had problem with Elliot-Rothenberg-Stock (ERS) Test manually too but in my case i had a confusion in calculating alpha (I put the trend instead of T(the number of observations)).

Well, let me help you now

After you regress ls ygls x1t x2t, you have to save the coefficients of the regressions. It is to say, save as follow:
scalar coefx1 = c(1)
scalar coefx2 = c(2)

After that, you have to detrend your originial variable which you want to take the ERS test with this coeficients estimated,it is to say:

gen ipi_detrended = ipi - (coefx1 + coefx2*t) (Notice that "coefx1 + coefx2*t" is the estimation of the deteministic part of your serie).

So now, you have to take the Augmented Dickey-Fuller(ADF) test to this variable and you will see that the t- statistic will be the same; but notice that when you select the type of regression in the ADF test in eviews set none because you have already detrended the variable.

I hope it helps you altought it was posted 2 years ago heheh! I just have sucripted last week to this forum.

Greetings from Peru!


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 17 guests