Demo for ffstream

Share:

Description

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

Usage

1
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.

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

1
2
3
4
5
6
df <- demo_ffstream()

## Not run: 
demo_ffstream(showPlot=TRUE)

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.