ENDERSGRANGER Procedure |
@EndersGranger performs the Enders-Granger test for threshold unit root behavior from Enders and Granger(1998). A related procedure for cointegration is @EndersSiklos.
This uses one of three "attractor" functions:
\(A(t) = \left\{ {\begin{array}{*{20}{c}} 0 \\ {{a_0}} \\ {{a_0} + {a_1}t} \\ \end{array}} \right.\)
controlled by the ATTRACTOR option. The regression run is
\(\Delta {y_t} = {\rho _1}{D_t}\left( {{y_{t - 1}} - A\left( {t - 1} \right)} \right) + {\rho _2}(1 - {D_t})\left( {{y_{t - 1}} - A(t - 1)} \right) + {\rm{lags}}\,{\rm{of}}\,\Delta y\)
where \({D_t}\) is the dummy for when the threshold series \(< \tau\). There are two options for the threshold series: either \({{y_{t - 1}}}\) or \(\Delta {y_{t - 1}}\), where the latter is called "Momentum TAR". \({\rho _1} = {\rho _2} = 0\) implies unit root behavior. \({\rho _1}\) and \({\rho _2}\) 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
Parameters
|
y |
series to analyze |
|
start, end |
range of y to use. By default, the defined range of y. |
Options
LAGS=# of lags on the differences [1]
ATTRACTOR=ZERO/[CONSTANT]/TREND
MODEL=[TAR]/MTAR
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, chosen by search]
PI=fraction of high and low empirical values for the threshold series which are omitted in the search [.15]
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.
[PRINT]/NOPRINT
TITLE=title for test report ["Enders-Granger Test"]
Variables Defined
|
%%BREAKVALUE |
threshold value chosen or input (REAL) |
|
%%EQUALSTAT |
test for equality for the \(\rho\)'s (REAL) |
|
%%PHISTAT |
joint test for zero on the \(\rho\)'s (REAL) |
|
%%TMAX |
maximum t-statistic on the \(\rho\)'s (REAL) |
Example
*
* Enders, Applied Econometric Time Series, 4th edition
* Example from Section 7.11, pp 464-465
* 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
Sample Output
Enders-Granger Test
TAR Model
Lags 1
Attractor -0.2700
T-Max -1.5904
Phi 7.7912
Equality 6.4230
Coeff Std Error
Above -0.0656 0.0412
Below -0.2858 0.0780
DY{1} 0.1717 0.0829
Enders-Granger Test
M-TAR Model
Lags 1
Attractor 1.6400
T-Max -0.1445
Phi 11.4462
Equality 12.2402
Coeff Std Error
Above -0.2994 0.0630
Below -0.0071 0.0495
DY{1} 0.0161 0.0879
Copyright © 2026 Thomas A. Doan