| cpt_test_null | R Documentation |
A test of the global null hypothesis "the series has no changepoint", the question an empty detection raises. Nothing is located first, so nothing is selected, and the p-value means what it says.
cpt_test_null(x, method = c("cusum", "pettitt", "supF"), index = NULL)
x |
A numeric series, or a |
method |
Which test:
|
index |
Optional time index for a bare series. |
A tibble with one row: method, statistic,
p_value, location (where the statistic peaks: the most
likely changepoint, reported for orientation only), n and
selection_adjusted (TRUE).
All three assume independent observations. Under positive
autocorrelation they reject too often, which is the same failure the
detectors share; see cpt_assumptions().
cpt_null_power() for what an empty answer could
have detected, cpt_test_at() for a pre-specified date.
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_robustness(),
cpt_screen(),
cpt_test_at()
set.seed(1)
cpt_test_null(rnorm(200))
shifted <- c(rnorm(100), rnorm(100, 0.6))
cpt_test_null(shifted, method = "pettitt")
cpt_test_null(shifted, method = "supF")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.