*! version 1 30jan2022
help radf

Title

radf -- Unit root tests for explosive behaviour:
right-tail augmented Dickey-Fuller (1979) (ADF); right-tail supremum ADF of Phillips, Wu and Yu (2011); right-tail generalised supremum ADF of Phillips, Shi and Yu (2015)

Syntax

radf varname [if] [in] [,
prefix(string)
maxlag(integer)
criterion(string)
window(integer)
bs
seed(integer)
boot(integer)
print
graph]

You must tsset your data before using radf; see [TS] tsset.

varname may contain time-series operators; see tsvarlist.

by is not allowed. Sample may not contain gaps.

Description

radf computes the right-tail augmented Dickey-Fuller (1979) (ADF) unit root test,
and its further developments based on supremum statistics derived from ADF-type regressions estimated using
recursive windows (Phillips, Wu and Yu, 2011) and recursive flexible windows (Phillips, Shi and Yu, 2015).
The command allows for the number of lags of the dependent variable in the test regression and the width of
rolling windows to be either specified by the user or determined using data-dependent procedures.
Also, it allows for the implementation of the date-stamping procedures advocated by Phillips, Wu and Yu (2011)
and Phillips, Shi and Yu (2015) to identify episodes of explosive behaviour.

For computational convenience, radf takes advantage of a large set of critical values already available in the
R Core Team (2020) package exuber; see Vasilopoulos, Pavlidis, Spavound and Martínez-García (2020b) and
Vasilopoulos, Pavlidis and Martínez-García (2020a). More specifically, the critical values that we incorporated in radf
are the 90, 95 and 99% critical values provided by exuber, which were obtained using 2000 replications, seed equal to 123,
initial window size given by r = 0.01 + 1.8/sqrt(T), and T = 6, 7, 8, ..., 600, 700, 800, ..., 2000 observations. For 600 < T <= 2000
the sample size is used to interpolate between the critical values. For T > 2000, the critical values that are included in the summary
results table correspond to those for T = 2000.

As an option, radf also computes 90, 95, and 99% bootstrap critical values following the wild bootstrap scheme advocated by Phillips and Shi (2020).
This option allows the computation of bootstrap critical values for any initial window width.

Options

prefix can be used to provide a `stub' with which variables created in radf will be named if no more than 600 observations
are in the specified sample. If this option is given, six Stata variables will be created for the appropriate range of dates:
prefix_SADF, prefix_BSADF, prefix_BSADF_95, prefix_BSADF_90, prefix_Exceeding95 and prefix_Exceeding90. These variables record the SADF and BSADF statistics,
with the third and fourth variables displaying the 95% and 90% critical values for the BSADF statistic, which vary over the estimation period.
The fifth and sixth variables are indicators, set to 1 when the BSADF statistic exceeds its 95% and 90% critical value, respectively.
The prefix option must be specified to enable the graph option.

maxlag sets the number of lags to be included in the test regression to account for residual serial correlation.
If not specified, radf sets the number of lags following Schwert (1989), with the formula maxlag=int{4*(T/100)^0.25}, where
where T is the total number of observations. In either case, the number of lags is reported in the output. If maxlag is given and the window width
is set by the data-dependent procedure, they may conflict. In this case, radf reduces maxlag so that each ADF regression has positive degrees of freedom.

criterion By default, radf computes the ADF regressions based on a fixed maxlag, either that determined by a data-dependent procedure or specified by the user.
Alternatively, the program can determine the optimal number of lags according to the Akaike or Schwarz information criteria, denoted AIC and SIC, respectively, or by following the
general-to-specific (GTS) algorithm advocated by Hall (1994) and Ng and Perron (1995). The criterion option can be used to specify AIC, SIC, GTS05 or GTS10 as alternatives
to the default value of FIX.

window The initial window width used in the rolling ADF regressions takes the default value of r = 0.01 + 1.8/sqrt(T). The window() option can be used to select a different window width.
However, as the critical values have been developed for the default window width, a warning is provided if the window width is set by the user, showing the default width and the selected width.

bs computes right-tail Monte Carlo critical values for 90, 95 and 99 percentiles based on the wild bootstrap advocated by Phillips and Shi (2020), using 199 replications.
This option does not permit the user to set a different number of replications, which may be done with the boot() option.
Also notice that the bootstrap critical values cannot be replicated unless bs is used along with option seed.

boot sets the number of replications to perform the wild bootstrap advocated by Phillips and Shi (2020).

seed sets the seed for random number generation.

print specifies that detailed results are to be printed, showing the ADF statistics and lag lengths for each of the regressions being estimated.

graph specifies that the timeseries of the SADF and BSADF statistics, which can be saved as variables with the prefix() option, should be graphed along with their 90% and 95% critical values.
The graphs will be saved with names specified by the prefix() option as prefix_SADF.gph and prefix_BSADF.gph. The graph option is not available if more than 600 observations are included in the specified sample,
and requires the use of the prefix() option.

Examples

We illustrate the use of the radf command to assess the existence of explosive behaviour in real house prices. To this end, we use data from the International House Price Database of the Federal Reserve Bank of Dallas,
which contains quarterly price information on 23 countries that dates back to the first quarter of 1975; see Mack and Martínez-García (2011) for methodological details on the database. To carry out our empirical illustration
we downloaded the data release for the first quarter of 2015 directly from the R console, following the steps described in Section 5.2 of Vasilopoulos, Pavlidis, Spavound and Martínez-García (2020b), and created a Stata version
of the data which was placed with the Boston College Economics Stata datasets.

We being by loading the dataset using the command bcuse, available from the SSC Archive, and verifying that the data have a time-series format:

. bcuse hprices

. tsset

We would like to test whether the price series index of the United Kingdom, uk, contains a unit root, against the alternative that it is an explosive process.
To use the default specifications for criterion and window, and setting a maxlag of p=1 over the full range of observations:

. radf uk, maxlag(1)

Given that the results presented above reject the unit root null hypothesis, one might proceed to plot the sequences of t-statistics and corresponding critical values to identify the time periods during which episodes of explosive behaviour
might have taken place. To this end we run the previous command using the prefix and graph options:

. radf uk, maxlag(1) prefix(_t) graph

To automatically compute critical values based on the wild bootstrap advocated by Phillips and Shi (2020) using default number of replications (that is, 199):

. radf uk, maxlag(1) bs

To compute critical values based on the wild bootstrap advocated by Phillips and Shi (2020) using any other number of replications, say 999:

. radf uk, maxlag(1) boot(999)

Stored results

radf stores the following in r():

Scalars

r(ntests) number of ADF tests

r(gsadfstat) GSADF statistic

r(sadfstat) SADF statistic

r(adfstat) ADF statistic

r(window) maximum window width

r(maxlag) maximum lag order in test

r(N) number of observations in full sample test

r(obs) number of observations available

Macros

r(last) last observation in window

r(first) first observation in window

r(varname) variable name

r(cmdline) command line

r(cmd) radf

Matrices

r(radfstats) matrix of test statistics and critical values, 3 x 4 without bootstrap CVs

r(radfstats) matrix of test statistics and critical values, 3 x 7 with bootstrap CVs

References

Dickey, D. A., and W. A. Fuller. 1979. Distribution of the Estimators for Autoregressive Time Series with a Unit Root. Journal of the American Statistical Association 74(366): 427–431.

Mack, A., and E. Martínez-García. 2011. A cross-country quarterly database of real house prices: a methodological note. Globalization Institute Working Papers 99, Federal Reserve Bank of Dallas.

Ng, S., and P. Perron. 1995. 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): 268–281.

Phillips, P. C. B., and S. Shi. 2020. Real time monitoring of asset markets: bubbles and crises. In Handbook of Statistics: Financial, Macro and Micro Econometrics Using R, ed. H. D. Vinod and C. R. Rao, vol. 42, 61–80. Amsterdam: Elsevier.

Phillips, P. C. B., S. Shi, and J. Yu. 2015. Testing for multiple bubbles: Historical episodes of exuberance and collapse in the S&P 500. International Economic Review 56 (4): 1043–1077.

Phillips, P. C. B., Y. Wu, and J. Yu. 2011. Explosive behavior in the 1990s NASDAQ: When did exuberance escalate asset values? International Economic Review 52 (1): 201–226.

R Core Team. 2020. R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria. https://www.R-project.org/.

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

Vasilopoulos, K., E. Pavlidis, and E. Martínez-García. 2020a. exuber: Recursive Right-Tailed Unit Root Testing with R. Globalization Institute Working Papers 383, FederalReserve Bank of Dallas.

Vasilopoulos, K., E. Pavlidis, S. Spavound, and E. Martíez-García. 2020b. exuber: Econometric Analysis of Explosive Time Series. R package version 0.4.1. https://github.com/kvasilopoulos/exuber.

Authors

Christopher F. Baum

Boston College

Chestnut Hill, MA USA

baum@bc.edu

Jesús Otero

Universidad del Rosario

Bogotá, Colombia

jesus.otero@urosario.edu.co

Also see

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

Stata Journal, volume 17, number 4: st0508