36
Stata Technical Bulletin
STB-57
sts15 Tests for stationarity of a time series
Christopher F. Baum, Boston College, [email protected]
Abstract: Implements the Elliott-Rothenberg-Stock (1996) DF-GLS test and the Kwiatkowski-Phillips-Schmidt-Shin (1992)
KPSS tests for stationarity of a time series. The DF-GLS test is an improved version of the augmented Dickey-Fuller test.
The KPSS test has a null hypothesis of stationarity and may be employed in conjunction with the DF-GLS test to detect long
memory (fractional integration).
Keywords: stationarity, unit root, time series.
Syntax
dfgls varname [if exp [in rangp [, maxlag(#) notrend ers ]
kpss varname [if exp [in rangp [, maxlag (#) notrend ]
Both tests are for use with time series data; you must tsset your data before using these tests; see [R] tsset. varname may contain time series
operators; see [U] 14.4.3 Time series varlists.
Options
maxlag (#) specifies the maximum lag order to be considered. The test statistics will be calculated for each lag up to the
maximum lag order (which may be zero). If not 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. Whether the
maximum lag is explicitly specified or computed by default, the sample size is held constant over lags at the maximum
available sample.
notrend specifies that no trend term should be included in the model. The critical values reported differ in the absence of a
trend term.
ERS (dfgls only) specifies that the ERS (and Dickey-Fuller) values are to be used for all levels of significance (eschewing the
response surface estimates).
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, 813).
dfgls applies a generalized least squares (GLS) detrending (demeaning) step to the varname
Vt =Vt- β'zt
For detrending, zt = (l,t)' and β0, β± are calculated by regressing
[yι, (1 - y2,..., (1 - alβ yτ]
onto
[z1, (1 - alβ z2,..., (1 - aL) zτ]
where a = 1 + c∕T with c = —13.5, and L is the lag operator. For demeaning, zt = (1/ and the same regression is
run with c = —7.0. The values of c are chosen so that “the test achieves the power envelope against stationary alternatives
(is asymptotically MPI (most powerful invariant)) at 50 percent power” (Stock 1994, 2769; emphasis added). The augmented
Dickey-Fuller regression is then computed using the yd series
where m=maxlag. The notrend option suppresses the time trend in this regression.
∆yd =a + -yt + pyd~1
+ ∑δi∆ydt-i
i=l
Approximate 5% and 10% critical values, by default, are calculated from the response surface estimates of Table 1, Cheung
and Lai (1995, 413), which take both the sample size and the lag specification into account. Approximate 1% critical values for