[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Re: problem with foreach in Stata 10.1

From   Christopher Baum <>
Subject   st: Re: problem with foreach in Stata 10.1
Date   Tue, 18 Nov 2008 11:05:23 -0500

< >
All good advice, but from a time series econometrics perspective, first-generation unit root tests such as -dfuller- and -pperron- are deprecated in favor of more powerful tests such as -dfgls- (disclaimer: I am one of the original coauthors (with Richard Sperling) of -dfgls- (STB57, STB58, freely available from . As demonstrated empirically in the talk

the augmented Dickey-Fuller test has very low power compared to the DF- GLS of Elliott, Rothenberg, Stock. An additional advantage is that - dfgls- automatically runs for a number of lag orders and provides a sophisticated selection criterion, due to Ng and Perron, which is superior to AIC/BIC. For instance

webuse lutkepohl
dfgls invest, maxlag(12)

Kit Baum, Boston College Economics and DIW Berlin
An Introduction to Modern Econometrics Using Stata:

On Nov 18, 2008, at 2:33 AM, Brian wrote:

- -dfuller- is an r-class command, but prior to Stata 10 it had been leaving
behind regression results in the e-class macros.  In general, r-class
commands should not affect any estimation results the user has lying
around, so in Stata 10 we modified -dfuller- to back up and restore the
user's prior estimation results.

In Joao Ricardo's example using Stata 10.1, his -estat ic- results are
always showing the results for the first call to -dfuller-; presumably he
did not do any estimation before calling -dfuller-, since in that case
- -dfuller- did not see any estimation results that it needed to back up and restore. In fact, -dfuller- should not be saving e-class results in that
case, either; we will address that in an ado-file update.

Using -estat ic- in conjunction with -dfuller- to choose the optimal
number of lags to include might at first blush seem like a good idea.
However, looking at his results using Stata 9 reveal a problem: the sample
size used in each case depends on the number of lags specified with
- -dfuller-. When using an information criterion to select the lag order, you should restrict the estimation sample to the subset of observations
that can be used with the maximum number of lags you wish to consider.

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index