new_fun_cpt {tidychangepoint}R Documentation

Class for model-fitting functions

Description

Class for model-fitting functions

Usage

new_fun_cpt(x, ...)

validate_fun_cpt(x)

fun_cpt(x, ...)

Arguments

x

a character giving the name of a model-fitting function

...

currently ignored

Details

All model-fitting functions must be registered through a call to fun_cpt().

All model-fitting functions must take at least three arguments:

See fit_meanshift_norm(),

Value

A fun_cpt object.

See Also

Other model-fitting: fit_lmshift(), fit_meanshift(), fit_meanvar(), fit_nhpp(), model_args(), model_name(), whomademe()

Examples

# 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)

[Package tidychangepoint version 1.0.0 Index]