- statsmodels.stats.diagnostic.breaks_cusumolsresid(resid, ddof=0)¶
Cusum test for parameter stability based on ols residuals.
The test statistic, maximum of absolute value of scaled cumulative OLS residuals.
Probability of observing the data under the null hypothesis of no structural change, based on asymptotic distribution which is a Brownian Bridge
The tabulated critical values, for alpha = 1%, 5% and 10%.
Tested against R:structchange.
Not clear: Assumption 2 in Ploberger, Kramer assumes that exog x have asymptotically zero mean, x.mean(0) = [1, 0, 0, …, 0] Is this really necessary? I do not see how it can affect the test statistic under the null. It does make a difference under the alternative. Also, the asymptotic distribution of test statistic depends on this.
From examples it looks like there is little power for standard cusum if exog (other than constant) have mean zero.
Ploberger, Werner, and Walter Kramer. “The Cusum Test with OLS Residuals.” Econometrica 60, no. 2 (March 1992): 271-285.