View source: R/wrap-nonparam.R
| cpm_wrapper | R Documentation |
Wraps cpm::processStream() (Ross, 2015) for distribution-free
sequential changepoint detection via repeated two-sample tests
(Mann-Whitney for location, Mood for scale, Lepage, Kolmogorov-Smirnov and
Cramer-von-Mises for general changes, and parametric Student/Bartlett/GLR
variants). Although the engine is designed for streams, it is run here
over the full series in one pass, mimicking online monitoring with average
run length arl0.
cpm_wrapper(x, cpm_type = "Mann-Whitney", arl0 = NULL, startup = 20, ...)
x |
A numeric vector. |
cpm_type |
Test statistic, passed to |
arl0 |
Target in-control average run length (how many observations,
on average, before a false alarm). cpm
ships thresholds only for a fixed grid (100, 200, 300, 370, 400, 500,
600, 700, 800, 900, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000,
9000, 10000, 20000, 30000, 40000 and 50000), and any other value is
refused, because the engine answers it by printing an error and
reporting no changepoints. The grid is the same for every
When |
startup |
Number of observations after each restart before monitoring
begins. Defaults to |
... |
Additional arguments passed to |
A ggcpt object. The changepoints tibble carries a
detection_time column: the index at which the sequential test
flagged each change (always later than the estimated location).
ross2015cpmggchangepoint
Other changepoint engines:
bcp_wrapper(),
beast_wrapper(),
bfast_wrapper(),
binsegrcpp_wrapper(),
bocpd_wrapper(),
capa_wrapper(),
cpop_wrapper(),
cpt_wrapper(),
decafs_wrapper(),
ecp_wrapper(),
envcpt_wrapper(),
esac_wrapper(),
fabisearch_wrapper(),
fastcpd_wrapper(),
fcov_wrapper(),
fmean_wrapper(),
fpop_wrapper(),
geomcp_wrapper(),
hdcov_wrapper(),
hdreg_wrapper(),
idetect_wrapper(),
inspect_wrapper(),
kcp_wrapper(),
kwc_wrapper(),
mcp_wrapper(),
mosum_wrapper(),
network_wrapper(),
not_wrapper(),
npmojo_wrapper(),
nsp_wrapper(),
ocd_wrapper(),
pilliat_wrapper(),
segmented_wrapper(),
smuce_wrapper(),
sn_wrapper(),
strucchange_wrapper(),
taylor_wrapper(),
tguh_wrapper(),
trend_wrapper(),
var_wrapper(),
wbs2_wrapper(),
wbs_wrapper(),
wbsts_wrapper()
res <- cpm_wrapper(c(rnorm(100), rnorm(100, 3)))
res$changepoints
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.