fastOnlineCpt {fastOnlineCpt}R Documentation

Initialize a new object of the class "fastOnlineCpt". This object allows one to add data in an online fashion and test for a changepoint.

Description

Initialize a new object of the class "fastOnlineCpt". This object allows one to add data in an online fashion and test for a changepoint.

Usage

fastOnlineCpt(spending_sequence)

Arguments

spending_sequence

A function f(n) of one argument which for every n returns a testing threshold such that \sum_{n=1}^\infty f(n) = \alpha, where \alpha is the desired level of the test over the (possibly infinite) time horizon.

Value

A new object of the class "fastOnlineCpt".

References

Hahn, G. (2021). Online multivariate changepoint detection with type I error control and constant time/memory updates per series. Under review.

Examples

library(fastOnlineCpt)
alpha <- 0.01
halfspent <- 100
spending_sequence <- function(n) { (n/(n+halfspent) - (n-1)/(n-1+halfspent)) * alpha }
obj <- fastOnlineCpt(spending_sequence)


[Package fastOnlineCpt version 1.0 Index]