MathType

Tuesday 16 August 2016

DF-GLS Unit Root Test with Stata (Time Series)




We have discussed and then how to perform two unit root test before, namely ADFtest and PP test. 

The ADF test was the first test developed for testing the null hypothesis of a unit root and its most commonly used test in practice. Other test have been developed later and many of them claim that have higher power.

The  power of unit root means that the test have a more power to reject the null hypothesis of a unit root against the alternative when alternative is true. So, a more powerful test is better able to distinguish between a unit AR root and a root that is large but less than 1.

For this discussion, we would like to look another unit root test proposed by Elliot, Rothenberg and Stock (1996) what they called it as DF-GLS (Dickey-Fuller Generalized Least Squares).

The test is introduced for the case that, under the null hypothesis, \({{Y}_{t}}\) has a random walk trend, possibility with drift, and under the alternative \({{Y}_{t}}\) is stationary around a linear time trend.

The DF-GLS test is computed in two steps.

In the first step, the intercept and trend are estimated by GLS. The GLS estimation is performed by computing three new variables, \({{V}_{t}}\),\({{X}_{1t}}\) and \({{X}_{2t}}\), where;

\({{V}_{1}}={{Y}_{1}}\)                                                                                                   (1)
\({{V}_{t}}={{Y}_{t}}-\alpha *{{Y}_{t-1}}\)      \(t=2,...T\)                                                        (2)
\({{X}_{11}}=1\)                                                                                                      (3)
\({{X}_{1t}}=1-\alpha *\)                 \(t=2,...T\).                                                       (4)
\({{X}_{21}}=1\)                                                                                                       (5)
\({{X}_{2t}}=t-\alpha *\left( t-1 \right)\)                                                                              (6)

where \(\alpha *\) is computed using formula \(\alpha *=1-13.5/T\).

Then \({{V}_{1}}\) is regressed against \({{X}_{1t}}\) and \({{X}_{2t}}\) by OLS to estimate the coefficient of the population regression equation;

\({{V}_{1}}={{\delta }_{0}}{{X}_{1t}}+{{\delta }_{2}}{{X}_{2t}}+{{e}_{t}}\)                                                                (7)

by using observation \(t=1,...T,\) where \({{e}_{t}}\) is error term and there is no intercept in Eq(7).

The OLS estimation \({{\hat{\delta }}_{0}}\) and \({{\hat{\delta }}_{1}}\) are then used to compute a “detrended” version of \({{Y}_{t}}\);

\(Y_{t}^{d}={{Y}_{t}}-\left( {{{\hat{\delta }}}_{0}}+{{{\hat{\delta }}}_{1}}t \right)\)                                                                    (8)

In the second step, the DF test is used to Eq(8) where the DF regression does not include an intercept or a time trend;
\(\Delta Y_{t}^{d}=\delta Y_{t-1}^{d}+\sum\limits_{i=1}^{k}{{{\gamma }_{i}}\Delta Y_{t-i}^{d}+{{\varepsilon }_{t}}}\)                                                                    (9)


where the number of lags \(k\)  is determined, as usual, either by expert knowledge or by using information criterion such as AIC and BIC.



The GLS regression in the first step of the DF-GLS test makes this test mode complicated than the conventional ADF test, but it improves its ability to reject the null hypothesis of unit root.

Although the DF-GLS looks complicated especially in the first step, but luckily for us the Stata provide the command dfgls which is design to test our time series data with DF-GLS method.

Now, we will perform the unit root test with DF-GLS method with the real data. The data that we dealt is same as we used in ADF test and PP test, the Macro_Stata data.

To perfom the DF-GLS test for gdp variable;

dfgls gdp

 
 
The results show that the null hypothesis of a unit root is failed to reject for lags 1-5, it is rejected at the 10% level for lags 6-11, and it is rejected at the 5% level for lags 11.

If we compared ADF test and PP test at lags 2, the DF-GLS test shows the series is stationary at lags 2 but not for ADF test and PP test.

The comparison means that the dfuller and pperron results are not as strong as those produced by dfgls and is not surprising because the  DF-GLS test with a trend has been shown to be more powerful than the standard ADF and PP.

If we want to test the variable gdp in the first difference, 

dfgls D.gdp


 
 
which show that the null hypothesis for a unit root is rejected for all the lags range.










No comments:

Post a Comment