*! version 1.0.0 12july2019

Title

adftest -- series of Augmented Dickey-Fuller test along
with the Breusch-Godfrey autocorrelation test

Syntax

adftest varname [if] [in] [, options]

Main
noconstant suppress constant term in regression

trend include trend term in regression

drift include drift term in regression

adflags(numlist) include numlist augmentations

bglags(numlist) test numlist lag orders

Since adftest uses dfuller function, you must tsset your data

before using adftest; see varname may contain time-series operators;

see tsvarlist.

Description

adftest performs Dickey-Fuller unit root test and displays
the results along with the Breusch-Godfrey autocorrelation test results.
The null hypothesis of the Dickey-Fuller test is that the variable
is non-stationary, while the alternative is that the variable is
stationary. Optional arguments allow to include a trend term, exclude
the drift term, and add augmentations in the regression. The Breusch-Godfrey
test is a test of the null hypothesis of the lack of serial correlation
in the disturbance.

Options

Main

noconstant suppresses the constant term (intercept) in
the model and indicates that the process under the null hypothesis
is a random walk without drift. By default, the constant term is
excluded from the regression. It may not be used with the drift
or trend option.

trend specifies that a trend term be included in
the associated regression and that the process under the null
hypothesis is a random walk, perhaps with drift. It may not be used
with the noconstant or drift option.

drift indicates that the process under the null hypothesis
is a random walk with nonzero drift. It may not be used
with the noconstant or trend option.

adflags(numlist) defines a list of augmentations, that is
number of lagged differences that appear in the right-hand-side of
the regression. By default, no lags are used, equivalently to lags(0), thus
(not-augmented) Dickey-Fuller test is performed.

bglags(numlist) specifies a list of numbers, indicating
the lag orders to be tested. The test will be performed separately for
each order. By default this test is not performed.

Examples

Setup

. sysuse sp500, clear

. bcal create sp500, from(date) generate(bussdate) replace

. tsset bussdate

Test whether close follows a unit-root process

. adftest close, adflags(0) bglags(1/4)

Perform 4 Dickey-Fuller tests with augmentations 0/3 supressing the constant term

. adftest close, adflags(0/3) bglags(1/4) noconst

Same as above, but for close first-differenced

. adftest D.close, adflags(0/3) bglags(1/4) noconst

Same as above, with extended numlists of both arguments

. adftest D.close, adflags(0/3 10) bglags(1/4 12) noconst

Stored results

adftest stores the following in r():

Martix

r(results) matrix of displayed results

Author

Piotr Wojcik, Faculty of Economic Sciences, University of Warsaw
proposed the original R function.

Rafal Wozniak, Faculty of Economic Sciences, University of Warsaw
translated the original R function into STATA and added some modifications.

rwozniak@wne.uw.edu.pl

Additional info

Some parts of the description were copied from help files of
dfuller and estat bgodfrey. The reason was not to cause
any confusion among users.