
Bai-Perron structural break wrapper (strucchange)
Source:R/wrap-regression.R
strucchange_wrapper.RdWraps strucchange::breakpoints() (Zeileis et al., 2002), the
dynamic-programming implementation of the Bai and Perron (1998, 2003)
multiple structural break estimator. Called with a bare numeric vector it
dates mean shifts (y ~ 1); called with a formula and data it dates
breaks in arbitrary regression coefficients. Break-date confidence
intervals from confint() populate ci_lower/ci_upper
and render via autoplot(show_ci = TRUE).
Arguments
- x
A numeric vector (mean-shift mode), or a model formula (regression mode; supply
datatoo).- data
Optional data frame for formula input.
- breaks
Maximum number of breaks; when
NULLthe number is chosen by BIC.- h
Minimal segment size, as a fraction of the sample size (or an integer count). Defaults to
0.15.- conf_level
Confidence level for the break-date intervals. Defaults to
0.95.- ...
Additional arguments passed to
strucchange::breakpoints().
References
Bai J, Perron P (2003). “Computation and analysis of multiple structural change models.” Journal of Applied Econometrics, 18(1), 1–22.
Zeileis A, Leisch F, Hornik K, Kleiber C (2002). “strucchange: An R package for testing for structural change in linear regression models.” Journal of Statistical Software, 7(2), 1–38.