DFUNIT Procedure |
@DFUnit performs an (augmented) Dickey-Fuller unit root test. This estimates the following (or the same without the intercept and trend, depending upon the choice of the deterministics):
\(\Delta {y_t} = \alpha + \beta t + \left( {\rho - 1} \right){y_{t - 1}} + \sum\limits_{j = 1}^p {{\varphi _j}\Delta {y_{t - j}}} + {u_t}\)
and tests for \(\left( {\rho - 1} \right) = 0 \). The number of augmenting lags (\(p\)) is to be chosen to make the residuals serially uncorrelated. This can be input directly, or you can allow it to be chosen automatically using one of several methods. The @ADFAutoSelect procedure can be used if you want to look more broadly at the effect of lag lengths on the Dickey-Fuller test statistic.
This is used in quite a few examples, but UNITROOT.RPF includes this and quite a few other unit-root testing procedures.
@DFUNIT( 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 for Selecting Lags
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).
SIGNIF=cutoff significance level for METHOD=TTEST or GTOS[.10]
Other Options
DET=NONE/[CONSTANT]/TREND
Choose what deterministic components to include.
[TTEST]/NOTTEST
Computes the regression t test, as opposed to the T(rho-1) test.
[PRINT]/NOPRINT
TITLE=Title for output ["Dickey-Fuller Unit Root Test, Series xxxx"]
Variables Defined
%CDSTAT |
test statistic (REAL) |
%NOBS |
number of observations (INTEGER) |
%RESIDS |
SERIES of residuals from ADF regression |
%%AUTOP |
number of augmenting lags used (INTEGER) |
%FSTAT |
joint F-statistic on unit root and zero on highest order deterministic (REAL) |
Example
This is part of unitroot.rpf. LGNP is log GNP, which has an apparent trend (thus the use of DET=TREND). The first of these will do the test using no augmenting lags, the second and third choosing the number of augmenting lags from a maximum of 6, the first by general-to-specific pruning, the second by minimum AIC.
@dfunit(det=trend) lgnp
@dfunit(det=trend,maxlags=6,method=gtos) lgnp
@dfunit(det=trend,maxlags=6,method=aic) lgnp
Output
The output from the three is very similar other than the description of how lags are selected. The null is a unit root, which is rejected in the left tail (for large negative values). With the two augmenting lags chosen automatically by both criteria, the test statistic is only slightly above the 10% critical value.
Dickey-Fuller Unit Root Test, Series LGNP
Regression Run From 1947:02 to 1989:01
Observations 169
With intercept and trend
Using fixed lags 0
Null is unit root. Reject in left tail.
Sig Level Crit Value
1%(**) -4.01489
5%(*) -3.43712
10% -3.14247
T-Statistic -1.94141
Dickey-Fuller Unit Root Test, Series LGNP
Regression Run From 1947:04 to 1989:01
Observations 167
With intercept and trend
With 2 lags chosen from 6 by GTOS/t-tests(0.100)
Null is unit root. Reject in left tail.
Sig Level Crit Value
1%(**) -4.01552
5%(*) -3.43742
10% -3.14265
T-Statistic -3.13012
Dickey-Fuller Unit Root Test, Series LGNP
Regression Run From 1947:04 to 1989:01
Observations 167
With intercept and trend
With 2 lags chosen from 6 by AIC
Null is unit root. Reject in left tail.
Sig Level Crit Value
1%(**) -4.01552
5%(*) -3.43742
10% -3.14265
T-Statistic -3.13012
Copyright © 2025 Thomas A. Doan