The ecp package provides a non-parametric way to detect changepoints. Unlike
the changepoint package, it does not assume raw data to have any formal
distribution. This wrapper function wraps two functions from the ecp package,
i.e., e.divisive() and e.agglo(). Users can use either function
by switching the algorithm argument. Before using the wrapper function,
seed should be set for the sake of reproducibility.
Arguments
- data
A numeric vector (for univariate) or matrix/data.frame (for multivariate).
- algorithm
Either
divisiveoragglo.divisiveis the default.- min_size
Minimum number of observations between change points. By default is 2. This argument is only applied when
algorithm = "divisive".- seed
Optional. A seed for reproducibility of the stochastic permutation test.
- ...
Extra arguments to pass on either from
e.divisive()ore.agglo().
Value
A tibble includes which point(s) is/are the changepoint along with
raw changepoint value corresponding to that changepoint. Changepoint
locations follow the ecp package convention: the first index of the
right segment. When no changepoint is found, an empty tibble is returned
(0 rows). The upstream fit is not retained — and $fit is
NULL on a ggcpt from cpt_detect(method = "ecp") —
because ecp::e.agglo()'s cluster-progression matrix is quadratic
in the series length; call the ecp functions directly if you need
their full output.
References
James NA, Matteson DS (2014). “ecp: An R package for nonparametric multiple change point analysis of multivariate data.” Journal of Statistical Software, 62(7), 1–25. doi:10.18637/jss.v062.i07 .
See also
Other changepoint engines:
bcp_wrapper(),
beast_wrapper(),
bfast_wrapper(),
binsegrcpp_wrapper(),
bocpd_wrapper(),
cpm_wrapper(),
cpop_wrapper(),
cpt_wrapper(),
decafs_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()
