| beast_wrapper | R Documentation |
Wraps Rbeast::beast() (Zhao et al., 2019), a Bayesian
model-averaging ensemble that estimates the number and location of trend
changepoints together with their posterior occurrence probabilities.
Locations whose posterior probability reaches prob_threshold are
reported; the probability profile renders via
ggcpt_posterior().
beast_wrapper(x, prob_threshold = 0.5, seed = NULL, ...)
x |
A numeric vector (treated as a non-seasonal series). |
prob_threshold |
Posterior probability cutoff in |
seed |
Optional seed for the engine's MCMC sampler (passed to
|
... |
Additional arguments passed to |
A ggcpt object. The changepoints tibble carries
posterior_prob, and the data tibble carries the posterior
mean trend in its fitted column.
zhao2019beastggchangepoint
Other changepoint engines:
bcp_wrapper(),
bfast_wrapper(),
binsegrcpp_wrapper(),
bocpd_wrapper(),
capa_wrapper(),
cpm_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()
# try(): Rbeast intermittently returns an all-NaN fit and the condition
# can persist for a session, so a check must not fail on it; the
# wrapper reports it by name when it happens.
res <- try(beast_wrapper(c(rnorm(60), rnorm(60, 4)), seed = 2026),
silent = TRUE)
if (!inherits(res, "try-error")) res$changepoints
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.