Codes

Note: All programs are distributed freely for non-profit academic purposes only. For other uses, please contact Pierre Perron at perron@bu.edu. A lot of effort has been put to construct these programs and we would appreciate that you acknowledge using a particular program in your research and cite the relevant papers on which it is based and the author of the code.

QTE.RD: Quantile Treatment Effects under the Regression Discontinuity Design“. Provides comprehensive methods for testing, estimating, and conducting uniform inference on quantile treatment effects in sharp regression discontinuity designs, incorporating covariates and implementing robust bias correction methods of Qu, Yoon, Perron, Review of Economics and Statistics (2024). Developed by Jungmo Yoon. 

mbreaks: Estimation and Inference for Structural Breaks in Linear Regression models“(available from CRAN R-project). This is an R version of the original Gauss code I wrote (with some updates and new functions) developed by Linh Nguyen and Yohei Yamamoto. For a description, see the paper “mbreaks: R Package for Estimating and Testing Multiple Structural Changes in Linear Regression Models “

A Two Step Procedure for Testing Partial Parameter Stability in Cointegrated Regression Models” (developed by Xuewen Xu). The zipped folder contains the replications files in Matlab for the paper “A Two Step Procedure for Testing Partial Parameter Stability in Cointegrated Regression Models,” (with Mohitosh Kejriwal and Xuewen Xu), forthcoming in the Journal of Time Series Analysis. It also contains procedures for the paper “Testing for Multiple Structural Changes in Cointegrated Regression Models,” (with Mohitosh Kejriwal), Journal of Business and Economic Statistics 28 (2010), 503-522.

Bootstrap Procedures for Detecting Multiple Persistence Shifts in Heteroskedastic Time Series,” (developed by Xuewen Xu). The zipped folder contains matlab to replicate the results in “Bootstrap Procedures for Detecting Multiple Persistence Shifts in Heteroskedastic Time Series” (with Mohitosh Kejriwal and Xuewen Xu), Journal of Time Series Analysis 41 (2020), 696-690.

Testing Jointly for Structural Changes in the Error Variance and Coefficients of a Linear Regression Model” (developed by Yohei Yamamoto; revised February 2023). This zipped folder contains matlab code to perform the procedures discussed in the paper “Testing Jointly for Structural Changes in the Error Variance and Coefficients of a Linear Regression Model,” (with Yohei Yamamoto and Jing Zhou), Quantitative Economics 11 (2020), 1019-1057

“Testing for Flexible Nonlinear Trends with an Integrated or Stationary Noise Component” Gauss code version (developed by Tomoyoshi Yabu); Matlab code version (developed by Mototsugu Shintani). These zipped folders contains Gauss or Matlab codes to perform the procedures discussed in the paper “Testing for Flexible Nonlinear Trends with an Integrated or Stationary Noise Component” by Pierre Perron, Mototsugu Shintani and Tomoyoshi Yabu.

Residuals based Tests for Cointegration using GLS Detrending Data” (developed by Gabriel Rodríguez and Miguel Ataurima). This zipped folder contains Gauss and Matlab codes to perform the procedures discussed in the paper “Residuals based Tests for Cointegration using GLS Detrending Data” (with Gabriel Rodríguez), Econometrics Journal 19 (2016), 84-111.

Wald Tests for Detecting Multiple Structural Changes in Persistence” (developed by Mohitosh Kejriwal). This zipped folder contains Gauss codes to perform the procedures discussed in the paper “Wald Tests for Detecting Multiple Structural Changes in Persistence,” (with Mohitosh Kejriwal and Jing Zhou), Econometric Theory 29 (2013), 289-323.

Estimating and Testing Multiple Structural Changes in Linear Models Using Band Spectral Regressions” (developed by Yohei Yamamoto). This zipped folder contains Matlab codes to perform the procedures discussed in the paper “Estimating and Testing Multiple Structural Changes in Linear Models Using Band Spectral Regressions” (with Yohei Yamamoto), Econometrics Journal 16 (2013), 400-429.

Let’s Take a Break: Trends and Cycles in U.S. Real GDP“, Journal of Monetary Economics 56 (2009), 749-765 (developed by Tatsuma Wada). This zipped folder contains Matlab codes to replicate the results in the paper “Let’s Take a Break: Trends and Cycles in U.S. Real GDP” (with Tatsuma Wada), Journal of Monetary Economics 56 (2009), 749-765.

GLS-based Unit Root Tests with Multiple Structural Breaks both Under the Null and the Alternative Hypotheses” (developed by Josep Lluís Carrion-i-Silvestre). This Gauss code is a companion to the paper GLS-based Unit Root Tests with Multiple Structural Breaks both Under the Null and the Alternative Hypotheses,” Econometric Theory, 25 (2009), 1754-1792.

Unit Root Tests Allowing for a Break in the Trend Function Under Both the Null and Alternative Hypotheses” (developed by Dukpa Kim). This Matlab code is a companion to the paper “Unit Root Tests Allowing for a Break in the Trend Function Under Both the Null and Alternative Hypotheses,” Journal of Econometrics 148, 2009, 1-13.

Estimating Deterministic Trends with an Integrated or Stationary Noise Component” (developed by Tomoyoshi Yabu). Revised March 2009. This GAUSS code is a companion to the paper “Estimating Deterministic Trends with an Integrated or Stationary Noise Component,” Journal of Econometrics, 151, 2009, 56-69. It contains a procedure to compute the test statistic and confidence intervals for the slope of a trend function that are valid whether the noise component is stationary or integrated. The Matlab version kindly developed and provided by Lola Gadea (2017) is available here.

Testing for Shifts in Trend with an Integrated or Stationary Noise Component,” (developed by Tomoyoshi Yabu), Revised March 2009. This GAUSS code is a companion to the paper “Testing for Shifts in Trend with an Integrated or Stationary Noise Component,” (with Tomoyoshi Yabu), Journal of Business and Economic Statistics 27 (2009), 369-396. It compute the test for breaks in the trend function of a time series valid whether the noise component is stationary or integrated. The Matlab version kindly developed and provided by Lola Gadea (2021) is available here.

Estimating and testing structural changes in multivariate regressions” Econometrica, 2007, (developed by Zhongjun Qu). Revised January 2007. This GAUSS code is a companion to the paper “Estimating and testing structural changes in multivariate regressions”. It contains procedures to do the following for a multi-equations model that allows multiple structural changes and arbitrary restrictions on the coefficients: 1) Estimate the model and construct confidence intervals for the estimates (break dates and coefficients); 2) Compute various tests for the presence of breaks; 3) Estimate and construct confidence intervals for the break dates of a two equations locally ordered break model (and construct the tests for the presence of breaks). The Matlab version kindly developed and provided by Davaajargal Luvsannyam  (Bank of Mongolia) is available here. A version in Eviews is also available; the details are available here.

Estimating restricted structural change models” (developed by Zhongjun Qu). Revised October 2004. This GAUSS code is a companion to the paper “Estimating Restricted Structural Change Models”. It contains procedures to do the following for a single equation model that allows multiple structural changes and arbitrary restrictions on the coefficients: 1) Estimate the model and construct confidence intervals for the estimates (break dates and coefficients); 2) Compute the sup-F test for breaks with restrictions; 3) Simulate the critical values of the restricted structural change sup-F test.

Computation and hypothesis testing in models with multiple structural changes” (developed by Pierre Perron). Revised 2004. This GAUSS code contains an extensive program that allows: constructing estimates of parameters in models with multiple stuctural change (the main ingredient being a dynamic programming algorithm); estimating the number of breaks (using information criteria or sequential hypothesis testing); constructing confidence intervals (in particular for the estimated break dates); testing for structural changes (various methods including global and sequential). The program allows one to estimate pure as well as partial structural change models. It also provide options to allow for heterogeneity and/or serial correlation in the data and the errors across segments. The code is described in more detail in “Computation and Analysis of Multiple Structural Change Models,” (with Jushan Bai), Journal of Applied Econometrics 18 (2003), 1-22. A Matlab version is available here (developed by Yohei Yamamoto; June 2012; revised May 2018).

Unit root tests with a one time structural change” (developed by Serena Ng and Pierre Perron). This zip file contains RATS procedures which test for a unit root allowing for a structural break when the time of the break is unknown. Each procedure allows one to use any of five different ways to select the lag order in an augmented autoregression over a prespecified range from 0 to kmax. Four models are considered; Model 0: change in mean with non-trending data; Model 1: change in level with trending data; Model 2: change in level and slope of the trend; Model 3: change in the slope of the trend with the segments joined at the time of break There are many different procedures, in particular, depending on the way the break point is selected and how the data are demeaned or detrended. Two sets of procedures are included one for Rats Version 3.1 and one for Version 4. Also included is a directory called pval which contains a small dos program that allows retrieving the asymptotic p-value of a given estimated test statistic (developed by Timothy J. Vogelsang).

Unit root tests with GLS detrended data and the MIC to select the autoregressive order” (developed by Serena Ng). This is a Gauss code that construct a variety of unit root tests (M-tests, Point optimal tests and ADF tests) using GLS-detrended data. To select the order of the autoregression, an option allows using the MIC developed in “Lag Length Selection and the Construction of Unit Root Tests With Good Size and Power,” (with Serena Ng), Econometrica 69 (2001), 1519-1554.