ENDERSGRANGER - Enders-Granger Threshold Unit Root Test
Attached is a procedure for doing the Enders-Granger test for threshold unit root behavior from Enders and Granger(1998), "Unit-Root Tests and Asymmetric Adjustment with an Example Using the Term Structure of Interest Rates", JBES, vol 16, pp 304-11.
The regression run is
dy = (rho1 D1 x (y{1} - attractor) + rho2 D2 x (y{1} - attractor)) + lags of dy
where D1 is the dummy for threshold series < tau and D2 is 1-D1. rho1=rho2=0 implies unit root behavior. rho1 and rho2 negative means that the process is "driven" towards the attractor. If they're negative but equal, there is no threshold effect. The procedure calculates three test statistics: the maximal t-stat on rho, a joint test for zero, and a test for equality.
@EndersGranger( options) y start end
Options
LAGS=# of lags on the differences [1]
ATTRACTOR=ZERO/[CONSTANT]/TREND
MODEL=[TAR]/MTAR/CMTAR
With MODEL=TAR, the threshold series is the lag of y. With MODEL=MTAR, it's the lagged difference of y.
TAU=threshold value [not used]
If you provide a value of TAU, the regressions are done with that fixed value for tau. If you don't, the values of the threshold series (excluding the PI fraction at each end) are searched for the one that minimizes the sum of squared residuals.
PI=fraction of high and low empirical values for the threshold series which are omitted in the search [.15]
[PRINT]/NOPRINT
TITLE=title for test report ["Enders-Granger Test"]
Variables Defined
Example
The regression run is
dy = (rho1 D1 x (y{1} - attractor) + rho2 D2 x (y{1} - attractor)) + lags of dy
where D1 is the dummy for threshold series < tau and D2 is 1-D1. rho1=rho2=0 implies unit root behavior. rho1 and rho2 negative means that the process is "driven" towards the attractor. If they're negative but equal, there is no threshold effect. The procedure calculates three test statistics: the maximal t-stat on rho, a joint test for zero, and a test for equality.
@EndersGranger( options) y start end
Options
LAGS=# of lags on the differences [1]
ATTRACTOR=ZERO/[CONSTANT]/TREND
MODEL=[TAR]/MTAR/CMTAR
With MODEL=TAR, the threshold series is the lag of y. With MODEL=MTAR, it's the lagged difference of y.
TAU=threshold value [not used]
If you provide a value of TAU, the regressions are done with that fixed value for tau. If you don't, the values of the threshold series (excluding the PI fraction at each end) are searched for the one that minimizes the sum of squared residuals.
PI=fraction of high and low empirical values for the threshold series which are omitted in the search [.15]
[PRINT]/NOPRINT
TITLE=title for test report ["Enders-Granger Test"]
Variables Defined
| %%TMAX | maximum t-statistic on the rho's |
| %%PHISTAT | joint test for zero on the rho's |
| %%EQUALSTAT | test for equality for the rho's |
Example
- Code: Select all
*
* Enders, Applied Econometric Time Series, 3rd edition
* Example from Section 7.11, pp 480-482
* Threshold unit root test
*
open data granger.xls
cal(q) 1958:1
data(format=xls,org=columns) 1958:01 1994:01 date r_short r_10
*
set spread = r_10-r_short
*
set ds = spread-spread{1}
*
@dfunit(maxlags=4,method=aic) spread
*
linreg ds
# constant spread{1} ds{1}
*
@EndersGranger(lags=1,attractor=constant) spread
@EndersGranger(lags=1,attractor=constant,model=mtar) spread