*! version 1 24mar2017
help adfmaxur (SJ18-1: st0511)

Title

adfmaxur -- Calculate Leybourne (1995) ADFmax unit-root
test statistic along with finite-sample critical values and associated
p-values

Syntax

adfmaxur varname [if] [in] [, noprint
maxlag(integer)
trend]

The by prefix is not allowed. The routine can be applied to a single
unit of a panel.

Before using adfmaxur, you must tsset your data;
see [TS] tsset.

varname may contain time-series operators; see tsvarlist.

Sample may not contain gaps.

Description

adfmaxur computes Leybourne (1995) ADFmax unit-root tests against the
alternative of stationarity. The command accommodates varname with
nonzero mean and nonzero trend. It also allows for the lag length to
be either fixed (FIXED) or determined endogenously using information
criteria such as Akaike and Schwarz, denoted AIC and SIC,
respectively. A data-dependent procedure often known as the
general-to-specific (GTS) algorithm is also permitted, using significance
levels of 5 and 10%, denoted GTS05 and GTS10, respectively; see,
for example, Hall (1994). Approximate p-values are also calculated.

Both the finite-sample critical values and the p-value are estimated based on
an extensive set of Monte Carlo simulations, summarized by means of response
surface regressions; for more details, see Otero and Smith (2012).

Options

noprint specifies that the results be returned but not printed.

maxlag(integer) sets the number of lags to be included in the test
regression to account for residual serial correlation. By default,
adfmaxur sets the number of lags following Schwert (1989) with the
formula maxlag()=int{12*(T/100)^0.25}, where T is the total number of
observations. In either case, the number of lags appears in the row labeled
FIXED of the output table.

trend specifies the modeling of intercepts and trends. By default,
adfmaxur assumes varname is a nonzero mean stochastic process,
so a constant is included in the test regression. If, on the other hand, the
trend option is specified, varname is assumed to be a nonzero trend
stochastic process, in which case a constant and a trend are included in the
test regression.

Examples

We begin by using the data and verifying that they have a time-series format. If needed, install bcuse from the SSC Archive.

. bcuse usurates

. tsset date

We would like to test whether the unemployment rate in each state contains a unit root against the alternative that it is a stationary process.
For practical purposes, visual inspection of the time plot of the variable of interest often provides useful guidelines as to whether a linear trend term should be included in the test regressions.
For our purposes, given that each unemployment series has a nonzero mean, but not trending behavior, the relevant test regression includes constant but not trend, which is the default option for adfmaxur

Setting a maxlag of p=12, the application of adfmaxur to the unemployment rate in the state of, say, Alabama, denoted ALUR, is implemented as follows:

. adfmaxur ALUR, maxlag(12)

This second illustration is the same as above but uses a subsample of the data that starts in the first month of 2000:

. adfmaxur ALUR if tin(2000m1,), maxlag(12)

We can perform the ADFmax test using all the available observations but with
the number of lags determined based on Schwert's formula:

. adfmaxur ALUR

Finally, we can also work with a long form of the data, in which a single variable UR contains all states' unemployment rates, and the sample is restricted to one state:

First, rename the variables so that they are in a suitable format to apply the command reshape; see [D] reshape:

. rename *UR UR*

. reshape long UR, i(date) j(state) string

Next, encode the state variable, and declare the dataset as a panel using xtset; see [D] encode and [XT] xtset, respectively:

. encode state, gen(stcode)

. xtset stcode date

Lastly, apply the command

. adfmaxur UR if stcode==1, maxlag(12)

Stored results

adfmaxur stores the following in r():

Scalars

r(N) number of observations in the test regression

r(minp) first period used in the test regression

r(maxp) last period used in the test regression

Macros

r(varname) variable name

r(treat) either constant or constant and trend

r(tsfmt) time-series format of the time variable

Matrices

r(results) results matrix, 5x6

The rows of the results matrix indicate which method of lag length was used:
FIXED (lag selected by user, or using Schwert's formula); AIC; SIC; GTS05; or GTS10.

The columns of the results matrix contain, for each method, the number of lags
used; the ADFmax statistic; its p-value; and the critical values at 1%, 5%,
and 10%, respectively.

References

Hall, A. 1994. Testing for a unit root in time series with pretest data-based
model selection. Journal of Business and Economic Statistics 12: 461-470.

Leybourne, S. J. 1995. Testing for unit roots using forward and reverse
Dickey-Fuller regressions. Oxford Bulletin of Economics and Statistics
57: 559-571.

Otero, J., and J. Smith. 2012. Response surface models for the Leybourne unit
root tests and lag order dependence. Computational Statistics 27:
473-486.

Schwert, G. W. 1989. Tests for unit roots: A Monte Carlo investigation.
Journal of Business and Economic Statistics 7: 147-159.

Authors

Jesús Otero

Universidad del Rosario

Bogotá, Colombia

jesus.otero@urosario.edu.co

Christopher F. Baum

Boston College

Chestnut Hill, MA

baum@bc.edu

Also see

Article: Stata Journal, volume 18, number 1: st0511