MathType

Tuesday, 7 June 2016

Unit Root test (ADF) with Stata (Time Series)






Let us write the random walk model as:

\({{Y}_{t}}=\rho {{Y}_{t-1}}+{{u}_{t}}\)                   \(-1\le \rho \le 1\)                           (1.1)


If \(\rho =1\) , it’s the case of the unit root (RW model without drift) and its nonstationary stochastic process.

For theoretical reason, we manipulated Eq(1.1) as follows: Substract  \({{Y}_{t-1}}\) from both side of Eq(1.1) to obtain:

               
                \({{Y}_{t}}-{{Y}_{t-1}}=\rho {{Y}_{t-1}}-{{Y}_{t-1}}+{{u}_{t}}\)
                                \(=\left( \rho -1 \right){{Y}_{t-1}}+{{u}_{t}}\)                                      (1.2)


or (Dickey-Fuller test):

\(\Delta {{Y}_{t}}=\delta {{Y}_{t-1}}+{{u}_{t}}\)                                                  (1.3)

where  \(\delta =\left( \rho -1 \right)\) and \(\Delta \)  = difference operator.
In Eq(1.3), we test the null hypothesis that \(\delta =0\) .

If \(\delta =0\), then \(\rho =1\) , that we have a unit root, meaning time series is nonstationary.

Dickey and Fuller (1979) have shown that under the null hypothesis that \(\delta =0\),   the estimated t  value of coefficient of \({{Y}_{t-1}}\)  in Eq(1.3) follows the \(\tau\)  (tau) statistic which Dickey and Fuller have computed critical value for tau statistics on the basis of Monte Carlo simulation.

The Dickey-Fuller test suggest three different forms, under three different null hypothesis;

\({{Y}_{t}}\)  is random walk:

\(\Delta {{Y}_{t}}=\delta {{Y}_{t-1}}+{{u}_{t}}\)                                                  (1.4)

\({{Y}_{t}}\)  is random walk with drift:
               
\(\Delta {{Y}_{t}}={{\beta }_{1}}+\delta {{Y}_{t-1}}+{{u}_{t}}\)                                    (1.5)


\({{Y}_{t}}\)  is random walk with drift around a stochastic trend:

\(\Delta {{Y}_{t}}={{\beta }_{1}}+{{\beta }_{2}}t+\delta {{Y}_{t-1}}+{{u}_{t}}\)               (1.6)

For each case, the null hypothesis is \(\delta =0\),  , the series have a unit root and nonstationary.

In case \({{u}_{t}}\)  are correlated, Dickey-Fuller developed a test, known as the augmented Dickey-Fuller (ADF) test.

The test is conducted by “augmenting” the preceding three equations by adding the lagged values of the dependent variable \(\Delta {{Y}_{t}}\) .

Supposed we used Eq(1.6). The ADF test will become;

                \(\Delta {{Y}_{t}}={{\beta }_{1}}+{{\beta }_{2}}t+\delta {{Y}_{t-1}}+\sum\limits_{i=1}^{m}{\Delta {{Y}_{t-i}}+{{\varepsilon }_{t}}}\)                                             (1.7)

For our example, we will use the Maco_Stata data.

Supposed that from the graph we choose to perform the DF test for variable gdp based on Eq(1.7).

We need first select an appropriate lags order for ADF by information criterion. To do this;



varsoc gdp




The AIC, HQIC and SBIC information criterion show that the appropriate lag is 2 .

Then, perform ADF test for gdp with lag 2.


dfuller gdp,trend lags(2)reg




 


The results for ADF test show that the \({{\tau }_{s}}=-2.550\)  , and if we choose significant level \(\alpha =0.05\) , the \({{\tau }_{c}}=-3.465\).

The decision is we fail to reject the null hypothesis for unit root.

That means the series of gdp (in level) is contained unit root processes and thus it’s nonstationary.

It’s clear that all series is nonstationary or contained unit root in level form and we need the time series to be stationary.

The non-stationary series usually can be eliminated when we difference the series.


To plot the series in difference form;


twoway(line D.gdp year)(line D.pdi year)(line D.pce year)
twoway(line D.profit year)(line D.div year)





To perform the ADF test for gdp in first difference form, first we need select an appropriate lags order for ADF by information criterion

varsoc D.gdp




 The AIC, HQIC and SBIC information criterion show that the appropriate lag is 2.

 Then, perform ADF test for D.gdp with lag 2


dfuller D.gdp,lags(2)



 




The results for ADF test show that the \({{\tau }_{s}}=-4.429\) , and if we choose significant level \(\alpha =0.05\)  , the \({{\tau }_{c}}=-2.903\) .

The decision is we successful reject the null hypothesis for unit root.

That means the series of D.gdp (in first difference) is stationary.



 




No comments:

Post a Comment