help xtbreak estimate v. 1.1 - 10. January 2022

Title

xtbreak estimate - estimating many structural breaks in time series and panel data at unknown break dates.

Syntax

Estimation of breakpoints:

xtbreak estimate depvar [indepvars] [if] [in] ,
breaks(#)
showindex
options1
options2
options5

Contents

Description

Options

Notes on Panel Data

Covariance Estimator

Saved Values

Postestimation

Examples

References

About, Authors and Version History

Description

xtbreak implements tests and estimates for multiple tests for structural breaks in time series and panel data models.

For the remainder we assume the following model:

y(i,t) = sigma0(1) + sigma1(1) z(i,t) + beta0(i) + beta1 x(i,t) + e(it) for t = 1,...,T1

y(i,t) = sigma0(2) + sigma1(2) z(i,t) + beta0(i) + beta1 x(i,t) + e(it) for t = T1+1,...,T2

...

y(i,t) = sigma0(s) + sigma1(s) z(i,t) + beta0(i) + beta1 x(i,t) + e(it) for t = Ts,...,T

where s is the number of the segment/breaks, z(i,t) is a NT1xq matrix containing the variables
whose relationship with y breaks.
A break in the constant is possible if time series data is used.
x(i,t) is a NTxp matrix with variables without breaks.
sigma0(s), sigma1(s) are the coefficients with structural breaks
and T1,...,Ts are the periods of the breakpoints.
beta1 is a px1 vector of coefficients with no breaks.
beta0(i) is a fixed effect (panel data models) or a constant (time series models).

xtbreak estimate estimates the break points, that is, it estimates
T1, T2, ..., Ts.
It implements the methods for detection of structural breaks discussed in
Bai & Perron (1998, 2003),
Karavias, Narayan, Westerlund (2021)
and Ditzen, Karavias, Westerlund (2021).
The underlying idea is that if the model with the true breakdates given a number of breaks
has a smaller sum of squared residuals (SSR) than a model with
incorrect breakdates.
To find the breakdates, xtbreak estimate uses the algorithm (dynamic program) from Bai and Perron (2003).
All necessary SSRs are calculated and then the smallest one selected.

xtbreak estimate also construct confidence intervals around the
estimates for break dates.

In case of variables without breaks, xtbreak will remove those before
calculating the SSRs.
The procedure follows the partial dynamic program algorithm in Bai and Perron (2003).

In pure time series model breaks in only the constant (or deterministics) are possible.
In this case sigma0(s) is a constant with a structural break.

xtbreak will automatically determine whether a time series or panel dataset
is used.

Options

showindex shows index for confidence intervals rather than formatted time value.

Saved Values

xtbreak estimate stores the following in e():

Matrices
e(breaks) Matrix with break dates. First row indicates the index (t=1,..,T), second the value of the time identifier (for example 2000, 2001, ...).
e(CI) Confidence intervals with dimension 4 x number_breaks.
The first two rows are the lower and upper 95% intervals using time indices, the second two rows are in the value of the time identifier.

Macros
e(sample) sample

Postestimation

xtbreak estimate supports three estat functions. The syntax to create an indicator is:

estat indicator [newvar]

to split a varlist according to the estimated breakpoints

estat split [varlist]

and to draw a scatter plot of the variable with break on the x-axis and
the dependent variable in the y-axis:

estat scatter [varname]

estat indicator creates a new variable which takes on the values
1,...,number_breaks+1 for segment of the data.
estat split splits the variables defined in varlist according to the breakdates.
estat split saves the names of the created variables in r(varlist).
estat scatter draws a scatter plot with the dependent variable on the
y-axis and a variable with breaks defined in varname on the x-axis.

Examples

Examples using usmacro.dta

For example we want to find breaks in the
US macro dataset supplied in Stata 16.
The dataset contains quarterly data on the inflation, GDP gap and the federal funds rate.
We load the data in as:

use http://www.stata-press.com/data/r16/usmacro.dta, clear

A simple model to estimate the GDP gap using the federal funds rate and inflation woudl be:

regress ogap inflation fedfunds

To estimate the date of - say - 2 breaks we write:

xtbreak estimate ogap inflation fedfunds, breaks(2)

Next, we can create an indicator variable using estat indicator:

estat indicator BreakRegimes

or split the variables into new ones with:

estat split inflation fedfunds