
SMUCE / HSMUCE wrapper — multiscale changepoint inference
Source:R/wrap-inference.R
smuce_wrapper.RdWraps stepR::stepFit() for the Simultaneous MUltiscale Changepoint
Estimator (SMUCE) of Frick, Munk and Sieling (2014) and its heterogeneous
extension HSMUCE (Pein, Sieling and Munk, 2017). SMUCE estimates a step
function subject to a simultaneous multiscale test at level alpha;
the level bounds the probability of over-estimating the number of
changepoints, and the fit delivers confidence intervals for every
changepoint location, which populate the ci_lower/ci_upper
columns of the result and render via autoplot(show_ci = TRUE) or
geom_cpt_ci().
Usage
smuce_wrapper(x, alpha = 0.5, family = c("gauss", "hsmuce", "poisson"), ...)Arguments
- x
A numeric vector.
- alpha
Significance level of the multiscale test in \((0, 1)\); smaller values yield more conservative (fewer-changepoint) fits. Defaults to
0.5, the upstream recommendation for estimation.- family
Noise model:
"gauss"(SMUCE, homogeneous Gaussian noise),"hsmuce"(HSMUCE, segment-wise variance), or"poisson"(SMUCE for Poisson counts). Defaults to"gauss".- ...
Additional arguments passed to
stepR::stepFit().
Value
A ggcpt object. The changepoints tibble carries
ci_lower/ci_upper (confidence interval for each
changepoint location) and the data tibble carries the SMUCE step
fit in its fitted column.
