Tsestatsbcusum
Tsestatsbcusum
com
estat sbcusum — Cumulative sum test for parameter stability
Description
estat sbcusum performs a test of whether the coefficients in a time-series regression are stable
over time. The test statistic is constructed from the cumulative sum of either the recursive residuals
or the ordinary least-squares (OLS) residuals.
estat sbcusum requires that the current estimation results be from regress.
Quick start
Test stability of parameters based on the cumulative sum of recursive residuals, and plot the cumulative
sum with 95% confidence bands
estat sbcusum
Same as above, but use OLS residuals
estat sbcusum, ols
1
2 estat sbcusum — Cumulative sum test for parameter stability
Syntax
estat sbcusum , options
options Description
recursive use cumulative sum of recursive residuals; the default
ols use cumulative sum of OLS residuals
generate(newvar) create newvar containing the cumulative sum of the residuals
level(#) set confidence level; default is level(95)
Plot
recast(plottype) plot cumulative sum statistic using plottype
cline options affect rendition of the line plotting the cumulative sum statistic
Confidence bands
cbopts(area options) affect rendition of the confidence bands
Add plots
addplot(plot) add other plots to the graph of the cumulative sum
Y axis, X axis, Titles, Legend, Overall
twoway options any options other than by() documented in [G-3] twoway options
You must tsset your data before using estat sbcusum; see [TS] tsset.
collect is allowed; see [U] 11.1.10 Prefix commands.
Options
recursive computes the cumulative sum (cusum) test statistic and draws a cusum plot using the
recursive residuals. This is the default.
ols computes the cusum test statistic and draws a cusum plot using the OLS residuals.
generate(newvar) creates a new variable containing the cusum of the residuals at each time period.
level(#) specifies the default confidence level, as a percentage, for confidence bands, when they are
reported. The default is level(95) or as set by set level; see [U] 20.8 Specifying the width
of confidence intervals.
Plot
recast(plottype) specifies that the cusum statistic be plotted using plottype. plottype may be scatter,
line, connected, area, bar, spike, or dropline; see [G-2] graph twoway.
cline options affect the rendition of the plotted cusum statistic. cline options are as described
in [G-3] cline options. When recast(plottype) is specified, the plot options are whatever is
appropriate for the specified plottype.
Confidence bands
cbopts(area options) affects the rendition of the confidence bands for the cusum statistic.
area options are as described in [G-3] area options.
estat sbcusum — Cumulative sum test for parameter stability 3
Add plots
addplot(plot) allows adding more graph twoway plots to the graph; see [G-3] addplot option.
Y axis, X axis, Titles, Legend, Overall
twoway options are any of the options documented in [G-3] twoway options, except by(). These
include options for titling the graph (see [G-3] title options) and options for saving the graph to
disk (see [G-3] saving option).
Introduction
estat sbcusum performs a test of parameter stability for linear regression coefficients. For instance,
estat sbcusum can test for structural breaks due to changes in regression coefficients over time.
The test can be performed using the cusum from recursive residuals (the default) or using the cusum
from OLS residuals.
In addition to reporting a test statistic, estat sbcusum plots the cusum of residuals and corre-
sponding confidence bands over the sample period.
Both cusum of residuals tests have the null hypothesis that all parameters are stable or constant
over time, but these tests do not require a specific alternative hypothesis. We reject this null hypothesis
based on the test statistic being larger than a critical value or based on the plotted cusum being
outside the confidence bands.
In their simulation study, Ploberger and Krämer (1992) show that the cusum test based on recursive
residuals has better power to detect parameter instability occurring early in the sample than the test
based on OLS residuals. By contrast, the OLS cusum statistic has better power to detect parameter
instabilities for breaks occurring later in the sample than the test based on recursive residuals.
.08
.06
.04
D.ln_wpi
.02
-.02
1960q1 1970q1 1980q1 1990q1
Quarterly date
The growth rate changes in the middle of the sample, which leads us to believe that the mean of
the series may not be stable during the sample period. Because we are only interested in the average
growth rate of the series, we fit a constant-only linear regression model. We fit the model with the
quietly command because we are not interested in the coefficient estimates themselves. We then
use estat sbcusum to check the stability of the mean in our sample.
. quietly regress D.ln_wpi
. estat sbcusum, level(99)
Cumulative sum test for parameter stability
Sample: 1960q2 thru 1990q4 Number of obs = 123
H0: No structural break
Test Critical value
Type statistic 1% 5% 10%
We can interpret the results by comparing the absolute value of the modified cusum statistic with
critical values; see Methods and formulas. We reject the null hypothesis of a constant mean at the
1% level because the test statistic value of 1.9030 exceeds the 1% critical level of 1.1430.
estat sbcusum — Cumulative sum test for parameter stability 5
-2
-4
1960q1 1970q1 1980q1 1990q1
Quarterly date
We can also examine the cusum plot. From the graph above, we see that the plot of the recursive
cusum process crosses the 99% confidence bands, which implies that the mean of the regression
model is not stable at the 1%, 5%, or 10% significance levels.
Moreover, the graph also provides information on the instability of the coefficients in the regression
model. Note that under the null hypothesis of no parameter instability, the expected value of the cusum
of recursive residuals is 0. In the graph above, the cusum of the recursive residuals starts crossing
the 99% confidence bands in the middle of the sample, which also indicates that the parameters of
the regression model become unstable during that time.
We reject the null hypothesis of parameter stability at the 1%, 5%, and 10% levels. The graph below
plots the OLS cusum process crossing the 99% band, which also implies rejection at the 1%, 5%, and
10% levels, confirming our results from the table.
OLS cusum plot of D.ln_wpi
with 99% confidence bands around the null
2
-1
-2
1960q1 1970q1 1980q1 1990q1
Quarterly date
Stored results
estat sbcusum stores the following in r():
Scalars
r(cusum) value of the test statistic
r(level) confidence level of confidence intervals
r(df) degrees of freedom
Macros
r(statistic) name of the statistic used; recursive or ols
r(tmins) formatted minimum time
r(tmaxs) formatted maximum time
Matrices
r(cvalues) vector of critical values
estat sbcusum — Cumulative sum test for parameter stability 7
b t−1 is the estimate of β for the first t − 1 observations and X0t−1 = (x1 , . . . , xt−1 ). The null
where β
hypothesis for the test of parameter stability is H0 : βt = β, which implies constant parameters β.
Under the null hypothesis, the sequence {erec t } is independent and identically distributed N (0, σ ).
2
References
Brown, R. L., J. Durbin, and J. M. Evans. 1975. Techniques for testing the constancy of regression relationships over
time. Journal of the Royal Statistical Society, Series B 37: 149–192. https://doi.org/10.2307/2986299.
Enders, W. 2004. Applied Econometric Time Series. 2nd ed. New York: Wiley.
Ploberger, W., and W. Krämer. 1992. The CUSUM test with OLS residuals. Econometrica 60: 271–285.
https://doi.org/10.2307/2951597.
Also see
[TS] estat sbknown — Test for a structural break with a known break date
[TS] estat sbsingle — Test for a structural break with an unknown break date
[TS] tsset — Declare data to be time-series data
[R] regress — Linear regression
Stata, Stata Press, and Mata are registered trademarks of StataCorp LLC. Stata and
®
Stata Press are registered trademarks with the World Intellectual Property Organization
of the United Nations. StataNow and NetCourseNow are trademarks of StataCorp
LLC. Other brand and product names are registered trademarks or trademarks of their
respective companies. Copyright c 1985–2023 StataCorp LLC, College Station, TX,
USA. All rights reserved.
For suggested citations, see the FAQ on citing Stata documentation.