Testing for unit root using DF-GLS
Posted: 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.
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.