Skip to contents

Unified tidy changepoint detection with ggplot2 visualisation.

Details

ggchangepoint provides a consistent S3 result class (ggcpt) for changepoint detection results, broom-style methods (tidy(), glance(), augment()), ggplot2 integration via autoplot() and composable geoms (geom_changepoint(), geom_cpt_segment(), geom_cpt_ci(), geom_cpt_region(), geom_cpt_label(), geom_cpt_event(), stat_changepoint()), and a unified dispatcher cpt_detect() that reaches fifty methods.

Detection engines. cpt_detect() dispatches to the methods in cpt_methods(), across nine families:

  • Penalised/optimal: PELT, BinSeg, SegNeigh, AMOC (changepoint); FPOP (fpop); fast binary segmentation (binsegRcpp); the CROPS penalty path (cpt_crops()); fastcpd (fastcpd, incl. AR/ARMA/GARCH); change-in-slope via CPOP (cpop).

  • Multiscale/search: WBS (wbs), WBS2 and TGUH (breakfast), NOT (not), MOSUM incl. multiscale (mosum), Isolate-Detect (IDetect), SMUCE/HSMUCE with confidence intervals (stepR), WBS for nonstationary series (wbsts).

  • Inference: Narrowest Significance Pursuit (nsp), which returns intervals rather than points.

  • Nonparametric/kernel: NP (changepoint.np), E-Divisive/E-Agglo (ecp), kernel running statistics (kcpRS), NP-MOJO (CptNonPar), sequential CPM (cpm), self-normalisation (SNSeg), depth ranks (KWCChangepoint).

  • Bayesian: Barry-Hartigan posterior (bcp), online BOCPD (ocp), BEAST model averaging (Rbeast), formula-based regression with changepoints (mcp).

  • High-dimensional: sparse projection (InspectChangepoint), online ocd (ocd), geometric mapping (changepoint.geo), sparsity-adaptive ESAC and Pilliat (HDCD), and covariance, network, VAR and high-dimensional-regression changes (changepoints).

  • Functional and network: functional mean and covariance (fChange), NMF-based network structure (fabisearch).

  • Regression, trend and season: Bai-Perron breaks with CIs (strucchange), broken-line regression (segmented), changepoints-vs-autocorrelation model selection (EnvCpt), drift+AR robust detection (DeCAFS), BFAST season-and-trend breaks (bfast).

  • Classical single-change tests: Pettitt, Buishand and SNHT (trend), Taylor's analyzer (ChangePointTaylor).

What surrounds the detectors. Every detector returns a ggcpt object with a stable tibble(cp, cp_value) contract, optionally carrying a time index, engine confidence intervals, a fitted signal, significance regions and diagnostics. Around that:

Author

Maintainer: Youzhi Yu yuyouzhi666@icloud.com