stats.diagnostic.breaks_cusumolsresid()

statsmodels.stats.diagnostic.breaks_cusumolsresid

statsmodels.stats.diagnostic.breaks_cusumolsresid(olsresidual, ddof=0)

cusum test for parameter stability based on ols residuals

Parameters:

olsresiduals : ndarray

array of residuals from an OLS estimation

ddof : int

number of parameters in the OLS estimation, used as degrees of freedom correction for error variance.

Returns:

sup_b : float

test statistic, maximum of absolute value of scaled cumulative OLS residuals

pval : float

Probability of observing the data under the null hypothesis of no structural change, based on asymptotic distribution which is a Brownian Bridge

crit: list :

tabulated critical values, for alpha = 1%, 5% and 10%

Notes

tested agains R:strucchange

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 don?t 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.

References

Ploberger, Werner, and Walter Kramer. ?The Cusum Test with Ols Residuals.? Econometrica 60, no. 2 (March 1992): 271-285.

doc_statsmodels
2017-01-18 16:19:18
Comments
Leave a Comment

Please login to continue.