
EnvCpt wrapper — changepoints versus trends versus autocorrelation
Source:R/wrap-regression.R
envcpt_wrapper.RdWraps EnvCpt::envcpt() (Beaulieu and Killick, 2018), which fits up
to twelve competing models — constant mean or linear trend, each with or
without changepoints, and with white-noise, AR(1) or AR(2) errors — and
lets an information criterion decide whether the series really contains
changepoints or merely trend/autocorrelation ("memory"). The changepoints
of the winning model (if any) are returned, and the winning model's name
is recorded, guarding against the classic false positive of running a
mean-shift detector on autocorrelated data.
Arguments
- x
A numeric vector.
- models
Character vector of models to fit; see
EnvCpt::envcpt(). Defaults to all twelve.- criterion
Model selection criterion:
"AIC"(default) or"BIC".- minseglen
Minimum segment length. Defaults to
5.- ...
Additional arguments passed to
EnvCpt::envcpt().
Value
A ggcpt object. $fit holds the full envcpt
output; the selected model name is stored in the penalty descriptor and
printed by glance() via penalty_type. Individual model
fits that fail are expected — the criterion ignores them — so the
engine's own try() output is not passed on; genuine warnings
still are, and a series on which no model fits at all raises an error.
References
Beaulieu C, Killick R (2018). “Distinguishing trends and shifts from memory in climate data.” Journal of Climate, 31(23), 9519–9543.
See also
Other changepoint engines:
bcp_wrapper(),
beast_wrapper(),
bfast_wrapper(),
binsegrcpp_wrapper(),
bocpd_wrapper(),
cpm_wrapper(),
cpop_wrapper(),
cpt_wrapper(),
decafs_wrapper(),
ecp_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()