| cpt_robustness | R Documentation |
Re-runs a detector under each setting of its noise-model argument
(family for stepR's SMUCE, variant for NSP, the cost
for the changepoint engines, ...) and reports which changepoints
appear under every setting and which only under some. A changepoint that
survives a change of noise model is evidence; one that survives a
bootstrap (cpt_stability()) or a change of algorithm
(cpt_consensus()) may only be a feature of the noise, which
resampling and other algorithms reproduce.
cpt_robustness(
x,
method = "pelt",
over = "noise_model",
settings = NULL,
margin = 5,
seed = NULL,
...
)
## S3 method for class 'ggcpt_robustness'
print(x, ...)
## S3 method for class 'ggcpt_robustness'
tidy(x, ...)
## S3 method for class 'ggcpt_robustness'
autoplot(object, ...)
x |
A numeric series, or a |
method |
The detector, when |
over |
What to vary. Only |
settings |
Optional named list of settings, each a list of
arguments for |
margin |
Positions within which two changepoints count as the same.
Defaults to |
seed |
Optional seed, scoped to this call. |
... |
Further arguments for every |
object |
A |
A ggcpt_robustness object: a list with settings
(one row per setting: setting, n_cp, powered and
error), changepoints (one row per changepoint of the
reference setting: cp, found_by (how many other powered
settings find it within margin), of (how many powered
alternatives there are) and survives), union and
intersection (distinct locations found by any and by every
powered setting) and fits. With print() and
autoplot().
A setting that finds nothing where the reference finds several is not a
vote against them: measured, NSP's variant = "ar" removes the
false positives of autocorrelated noise by removing detection altogether
(0 of 2 real changes found). Such a setting is marked
powered = FALSE and left out of found_by.
cpt_assumptions(), cpt_sensitivity()
for sweeping any argument.
Other inference:
cpt_abruptness(),
cpt_assumptions(),
cpt_attribute(),
cpt_attribute_event(),
cpt_confint_coverage(),
cpt_effect(),
cpt_gof(),
cpt_k_weights(),
cpt_null_power(),
cpt_screen(),
cpt_test_at(),
cpt_test_null()
set.seed(1)
x <- c(rnorm(100), rnorm(100, 2)) + as.numeric(arima.sim(list(ar = 0.6), 200))
cpt_robustness(x, method = "pelt")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.