demo_ffstream: Demo for ffstream

View source: R/demo.R

demo_ffstreamR Documentation

Demo for ffstream

Description

Provides a demonstration of the AFF method detecting changepoints in a stream.

Usage

demo_ffstream(showPlot = FALSE, returnStream = FALSE, plotSmall = FALSE)

Arguments

showPlot

Boolean flag; if TRUE, then a plot is generated. Default is FALSE.

returnStream

Boolean flag; if TRUE, then return the stream as part of the list returned by the demo. Default is FALSE.

plotSmall

Boolean flag; if TRUE, creates a small plot, as needed for the vignette. Default is FALSE.

Details

This method generates a stream with three changepoints, and finds the changepoints with AFF. Also creates a plot of the data and the changepoints if the showPlot flag is set to TRUE. The observations are shown in black, the true changepoints are shown as red dotted vertical lines, and the detected (estimated) changepoints are shown as blue dashed lines. The following is returned in a list:

tau

The location of the true changepoints.

tauhat

The detected (estimated) changepoints.

method

The method used, in this case AFF.

param

The data frame with the parameters used in the AFF method, in this case,

alpha

The significance level,

eta

The step size in the gradient descent, whose value is not particularly important,

BL

The length of the burn-in period.

Value

Print output to screen, and plot (optional).

Author

Dean Bodenham

References

D. A. Bodenham and N. M. Adams (2016) Continuous monitoring for changepoints in data streams using adaptive estimation. Statistics and Computing doi:10.1007/s11222-016-9684-8

Examples

df <- demo_ffstream()


demo_ffstream(showPlot=TRUE)




ffstream documentation built on May 31, 2023, 7:53 p.m.