ERSTEST Procedure |
@ERSTEST performs Elliott, Rothenberg and Stock(1996) unit root tests. These are two-step testing procedures, where the data are first de-meaned or de-trended using GLS, then a unit root test is applied to the result. A separate procedure for doing just the detrending is available as @GLSDETREND. It also does the related tests with a different treatment of the initial observation from Elliott(1999).
@ERSTEST( options ) series start end
Wizards
This is included as one of the tests in the Time Series—Unit Root Test Wizard.
Parameters
|
series |
series to analyze |
|
start end |
range of series to use (not range over which test is run). By default, the defined range of series. |
Options
DET=NONE/[CONSTANT]/TREND
Deterministic part (TREND uses (1,t))
CBAR=(positive) value of c-bar to use [based upon choice for DET]
The GLS filter is \((1 - \bar cL)\). Although this is provided as an option (for possible experimentation), you shouldn't really use it, as the critical values for the test statistic change with different values.
LAGS=number of additional lags [0]
MAXLAGS=maximum number of additional lags to consider [number of observations^.25]
You can use either of these to select the (maximum) number of additional lags. If you don't use either option, the LAGS default of 0 will be used for METHOD=INPUT and the MAXLAGS default will be used for the others.
METHOD=[INPUT]/AIC/BIC/HQ/TTEST/GTOS/SBC/MAIC
METHOD=INPUT uses the input number of LAGS only. METHOD=AIC/BIC (or SBC)/HQ/MAIC test the D-F regressions for everything from 0 to LAGS/MAXLAGS and chooses the minimizer for the chosen criterion. MAIC is the version of AIC modified for unit root testing from Ng and Perron(2001). METHOD=TTEST/GTOS starts with the full set of lags and deletes lags as long as the final one has a marginal significance level less than the cutoff given by the SIGNIF option. (GTOS is short for General-TO-Specific).
Note that there are two sets of tests: one for each assumption regarding the initial observation, and those can choose different lag lengths if you use one of the automatic lag length choice methods.
SIGNIF=cutoff significance level for METHOD=TTEST or GTOS[.10]
PRINT/[NOPRINT]
TITLE="title of report" ["DF-GLS Tests, Series xxxx"]
Variables Defined
The first two of these are from the original ERS paper; the third and fourth are from Elliott(1999).
|
%%PT |
value of PT test (REAL) |
|
%%DFGLS |
value of DFGLS test (REAL) |
|
%%QT |
value of QT test (REAL) |
|
%%DFGLSU |
value of DFGSLu test (REAL) |
|
%%AUTOP |
number of lags chosen for the first DF-GLS test (INTEGER) |
Example
This does a test allowing for a trend in the data, choosing lags from up to 12 using AIC.
@erstest(det=trend,maxlags=12,method=aic) lgnp
Sample Output
The first two tests in the output are from Elliott, Rothenberg and Stock(1996) which assume a zero pre-sample residual and the last two are from Elliott(1999) which assumes the pre-sample residual is drawn from its unconditional distribution. As you can see, the values can be quite different even with 169 (quarterly) observations (as seen in the critical values, the U statistics tend to be more smaller numerically), though part of that is due to the lag length choice being different (3 for the first set, 2 for the second). If you fix a certain number of lags (either 2 or 3), (same instruction with LAGS=2 or LAGS=3 option without the METHOD option) the results are qualitatively similar.
DF-GLS Tests, Dependent Variable LGNP
From 1947:01 to 1989:01
Lag Length Chosen from 12 by AIC
Detrend = constant and linear time trend, z(t)=(1,t)
Tests for a unit root null. All tests reject null in lower tail
Critical values (asymptotic)
Elliott et al (1996 Econometrica)
Stat Lags 1%(**) 2.5% 5%(*) 10%
PT 9.839 3.96 4.78 5.62 6.89
DFGLS -2.014 3 -3.48 -3.15 -2.89 -2.57
Elliott (IER 1999)
QT 3.179 2.05 2.44 3.15 3.44
DFGLSu -2.957 2 -3.71 -3.41 -3.17 -2.91
Copyright © 2025 Thomas A. Doan