View source: R/wrap-functional.R
| fmean_wrapper | R Documentation |
Wraps fChange::fchange() for changes in the mean function of
a functional time series: each observation is a curve, and the question is
when the average curve shape changes. The binary-segmentation
("segmentation") mode finds multiple changes; the "single"
mode runs the one-change test and reports its p-value.
fmean_wrapper(
x,
statistic = c("Tn", "Mn"),
critical = c("simulation", "resample", "welch"),
type = c("segmentation", "single"),
alpha = 0.05,
robust = FALSE,
...
)
x |
A numeric matrix or data frame with one row per time point and one column per grid location (the curve's resolution). |
statistic |
Test statistic: |
critical |
How critical values are obtained: |
type |
|
alpha |
Significance level. Defaults to |
robust |
Use the robust ( |
... |
Additional arguments passed to |
A ggcpt object; the changepoints tibble carries the
engine's p_value for each location. Multivariate input is
reduced to one series per observation by taking the
cross-sectional mean of the columns, and that is the series stored on
the result: autoplot() draws it, tidy()'s
cp_value reads it, and $segments$param_estimate and
augment()'s .fitted/.resid are computed from it.
It is not any one column of the input. The full input is kept in
$data_wide for autoplot(type = "coordinates").
aue2018fchangeggchangepoint
Other changepoint engines:
bcp_wrapper(),
beast_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(),
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()
set.seed(2026)
# 10 curves and M = 50, not 20 and 200: the example is a demonstration,
# and the wider version measured 6.7 s against CRAN's 5 s budget.
X <- matrix(rnorm(60 * 10), nrow = 60)
X[31:60, ] <- X[31:60, ] + 2
fmean_wrapper(X, M = 50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.