fastOnlineCpt: Initialize a new object of the class "fastOnlineCpt". This...

Description Usage Arguments Value References Examples

View source: R/fastOnlineCpt.r

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

1
fastOnlineCpt(spending_sequence)

Arguments

spending_sequence

A function f(n) of one argument which for every n returns a testing threshold such that ∑_{n=1}^∞ f(n) = α, where α 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

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

fastOnlineCpt documentation built on July 9, 2021, 9:08 a.m.