.-
help for ^dfgls^  (Statalist distribution, rev 26 Sep 2001 from STB-57, 58)
.-

Dickey-Fuller/Generalized Least Squares unit root test
------------------------------------------------------

    ^dfgls^ varname  [^if^ exp] [^in^ range] [^,^ ^m^axlag^(^#^)^ ^not^rend 
                     ^ERS^ ^GEN^erate(newvar)]


^dfgls^ is for use with time-series data.  You must ^tsset^ your data before
using ^dfgls^; see help @tsset@.

varname may contain time-series operators; see help @varlist@.


Description
-----------

^dfgls^ performs the Elliott-Rothenberg-Stock (ERS, 1996) efficient test for an
autoregressive unit root. This test is similar to an (augmented) Dickey-Fuller
"t" test, as performed by ^dfuller^, but has the best overall performance in
terms of small-sample size and power, dominating the ordinary Dickey-Fuller 
test. The ^dfgls^ test "has substantially improved power when an unknown mean 
or trend is present" (ERS, p.813). 

The test applies a GLS detrending (demeaning) step to the ^varname^; 
the detrended (demeaned) series is then tested via the Dickey-Fuller 
regression. Demeaning only is performed if the ^notrend^ option is specified.
The maximum lag order for the test is by default calculated from the sample
size using a rule provided by Schwert (1989) using c=12 and d=4 in his
terminology. The maximum lag order may also be provided with the ^maxlag^
option, and may be zero. If the maximum lag order exceeds one, the test 
is performed for each lag, with the sample size held constant over lags 
at the maximum available sample. 

Approximate 5% and 10% critical values, by default, are calculated from the
response surface estimates of Table 1, Cheung and Lai (1995), which take both 
the sample size and the lag specification into account. Approximate 1% critical
values for the GLS detrended test are interpolated from ERS, Table 1 (p.825). 
Approximate 1% critical values for the GLS demeaned test are identical to 
those applicable to the no-constant, no-trend Dickey-Fuller test, 
and are computed using the ^dfuller^ code. The ^ERS^ option specifies that
the ERS (and Dickey-Fuller) values are to be used for all levels of 
significance (eschewing the response surface estimates).

If the maximum lag order exceeds one, the optimal lag order is calculated
by the Ng-Perron (1995) sequential t test on the highest order lag coefficient,
stopping when that coefficient's p-value is less than 0.10. The lag minimizing 
the SC (BIC) criterion is printed with its minimized value. The lag minimizing
the Ng-Perron (2000) modified AIC, or MAIC, is also printed with its minimized
value. Ng and Perron have established that the MAIC may provide "huge size 
improvements" in the DFGLS context. The DF-GLS test statistic, seq-t optimal 
lag order, RMSE (calculated from sample size T) and values of the MAIC and SC 
for each lag are placed in the return array.


Options
-------

^maxlag(^#^)^ specifies the maximum lag order to be used in augmenting the 
Dickey-Fuller regression. If omitted, the maximum lag order is calculated
as described above.

^notrend^ indicates that GLS demeaning, rather than GLS detrending, is to
be performed.

^GEN^erate(^newvar^) specifies that the residuals from the detrending 
(or demeaning) regression should be saved as a new variable for subsequent
analysis. The residuals correspond to the ^maxlag^ regression, whether that
value is specified as an option or computed internally.


Examples
--------

	. ^dfgls gnp^

	. ^dfgls gnp, maxlag(12) notrend^
	
	. ^dfgls gnp if tin(1973q1,1995q4)^
	
	. ^dfgls gnp, gen(gdpres)^
	. ^wntestq gdpres^


References
----------

Cheung, Yin-Wong and Kon S. Lai. Lag Order and Critical Values of a Modified
Dickey-Fuller Test. Oxford Bulletin of Economics and Statistics, 57:3,
1995, 411-419.

Elliott, Graham, Rothenberg, Thomas J., and James H. Stock. Efficient Tests for
an Autoregressive Unit Root. Econometrica, 64:4, 1996, 813-836.
 
Ng, Serena and Pierre Perron. Unit Root Tests in ARMA Models with 
Data-Dependent Methods for the Selection of the Truncation Lag. Journal of 
the American Statistical Association, 90:429, 1995, 268-281.

Ng, Serena, and P. Perron. 2001. LAG Length Selection and the Construction of 
Unit Root Tests with Good Size and Power. Econometrica 69: 1519-54.
http://fmwww.bc.edu/ec-p/wp369.pdf.

Schwert, G.W. Tests for Unit Roots: A Monte Carlo Investigation. Journal of
Business and Economic Statistics, 7, 1989, 147-160.

Acknowledgements
----------------

We have had useful conversations with Serena Ng on the importance of these
tests, and the use of the Ng-Perron criterion to determine appropriate
lag order. Vince Wiggins of StataCorp provided invaluable assistance 
with development and correction of the code, and Kameliia Petrova assisted
in diagnosing and correcting indexing bugs. Remaining errors are our own.
 
Authors
-------

Christopher F Baum, Boston College, USA
baum@@bc.edu

Richard Sperling, The Ohio State University, USA
rsperling@@boo.net

Also see
--------

 Manual:  ^[R] dfuller^
On-line:  help for @dfuller@, @time@, @tsset@