Main Content

Cusum test for structural change

Cusum tests assess the stability of coefficients (*β*) in a multiple linear regression model of the form *y* = *Xβ* + *ε*. Inference is based on a sequence of sums, or sums of squares, of recursive residuals (standardized one-step-ahead forecast errors) computed iteratively from nested subsamples of the data. Under the null hypothesis of coefficient constancy, values of the sequence outside an expected range suggest structural change in the model over time.

`cusumtest(`

plots both the sequence of cusums and the critical lines for conducting a cusum test on the multiple linear regression model `X`

,`y`

)`y`

= `X`

*β* + *ε*.

`cusumtest(`

plots using the data in the tabular array `Tbl`

)`Tbl`

. The first `numPreds`

columns are the predictors (`X`

) and the last column is the response (`y`

).

`cusumtest(___,`

specifies options using one or more name-value pair arguments in addition to the input arguments in previous syntaxes. For example, you can specify which type of cusum test to conduct by using `Name,Value`

)`'`

`Test`

`'`

or specify whether to include an intercept in the multiple regression model by using `'`

`Intercept`

`'`

.

`cusumtest(`

plots on the axes specified by `ax`

,___)`ax`

instead
of the current axes (`gca`

). `ax`

can precede any of the input
argument combinations in the previous syntaxes.

Cusum tests have little power to detect structural changes:

Late in the sample period

When multiple changes produce cancellations in the cusums

The cusum of squares test:

Is a “useful complement to the cusum test, particularly when the departure from constancy of the [recursive coefficients] is haphazard rather than systematic” [1]

Has greater power for cases in which multiple shifts are likely to cancel

Is often suggested for detecting structural breaks in volatility

`Alpha`

specifies the nominal significance levels for the tests. The actual size of a test depends on various assumptions and approximations that`cusumtest`

uses to compute the critical lines. Plots of the recursive residuals are the best indicator of structural change. Brown, et al. suggest that the tests “should be regarded as yardsticks for the interpretation of data rather than leading to hard and fast decisions” [1].To produce basic diagnostic plots of the recursive coefficient estimates having the same scale for test

, enter`n`

plot(B(:,:,

*n*)')`recreg`

produces similar plots, optionally using robust standard error bands.

`cusumtest`

handles initially constant predictor data using the method suggested in [1] . If a predictor's data is constant for the first`numCoeffs`

observations and this results in multicollinearity with an intercept or another predictor, then`cusumtest`

drops the predictor from regressions and the computation of recursive residuals until its data changes. Similarly,`cusumtest`

temporarily holds out terminally constant predictors from backward regressions. Initially constant predictors in backward regressions, or terminally constant predictors in forward regressions, are not held out by`cusumtest`

, and can lead to rank deficiency in terminal iterations.`cusumtest`

computes critical lines for inference in essentially different ways for the two test statistics. For cusums,`cusumtest`

solves the normal CDF equation in [1] dynamically for each value of`Alpha`

. For the cusums of squares test,`cusumtest`

interpolates parameter values from the table in [2], using the method suggested in [1]. Sample sizes with degrees of freedom less than 4 are below tabulated values, and`cusumtest`

cannot compute critical lines. Sample sizes with degrees of freedom greater than 202 are above tabulated values, and`cusumtest`

uses the critical value associated with the largest tabulated sample size.

[1] Brown, R. L., J. Durbin, and J. M. Evans. “Techniques for Testing the Constancy of Regression Relationships Over Time.”
*Journal of the Royal Statistical Society, Series B*. Vol. 37, 1975, pp. 149–192.

[2] Durbin, J. “Tests for Serial Correlation in Regression Analysis Based on the Periodogram of Least Squares Residuals.”
*Biometrika*. Vol. 56, 1969, pp. 1–15.

`chowtest`

| `fitlm`

| `LinearModel`

| `recreg`