Title
[TS] dfuller -- Augmented Dickey-Fuller unit-root test
Syntax
dfuller varname [if] [in] [, options]
options Description
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Main
noconstant suppress constant term in regression
trend include trend term in regression
drift include drift term in regression
regress display regression table
lags(#) include # lagged differences
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
You must tsset your data before using dfuller; see [TS] tsset.
varname may contain time-series operators; see tsvarlist.
Menu
Statistics > Time series > Tests > Augmented Dickey-Fuller unit-root test
Description
dfuller performs the augmented Dickey-Fuller test that a variable follows a unit-root process. The null hypothesis is that the variable contains a unit root, and the alternative is
that the variable was generated by a stationary process. You may optionally exclude the constant, include a trend term, and include lagged values of the difference of the variable in
the regression.
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. noconstant cannot be used
with the trend or drift 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. This option 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. This option may not be used with the noconstant or trend option.
regress specifies that the associated regression table appear in the output. By default, the regression table is not produced.
lags(#) specifies the number of lagged difference terms to include in the covariate list.
Examples
Setup
. webuse air2
Test whether air follows a unit-root process
. dfuller air
Same as above, but include 3 lagged differences and a trend term
. dfuller air, lags(3) trend
Same as above, but also display the regression table
. dfuller air, lags(3) trend regress
Stored results
dfuller stores the following in r():
Scalars
r(N) number of observations
r(lags) number of lagged differences
r(Zt) Dickey-Fuller test statistic
r(p) MacKinnon approximate p-value (if there is a constant or trend in associated regression)