View source: R/class-fun_cpt.R
new_fun_cpt | R Documentation |
Class for model-fitting functions
new_fun_cpt(x, ...)
validate_fun_cpt(x)
fun_cpt(x, ...)
x |
a |
... |
currently ignored |
All model-fitting functions must be registered through a call to fun_cpt()
.
All model-fitting functions must take at least three arguments:
x
: a time series,
tau
: a set of changepoint indices
...
: other arguments passed to methods
See fit_meanshift_norm()
,
A fun_cpt object.
Other model-fitting:
fit_lmshift()
,
fit_meanshift()
,
fit_meanvar()
,
fit_nhpp()
,
model_args()
,
model_name()
,
whomademe()
# Register a model-fitting function
f <- fun_cpt("fit_meanvar")
# Verify that it now has class `fun_cpt`
str(f)
# Use it
f(CET, 42)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.