bootJLDetectChangePoint: Bootstrap Change Point Detection with Johnson-Lindenstrauss...

View source: R/bootJLDetectChangePoint.R

bootJLDetectChangePointR Documentation

Bootstrap Change Point Detection with Johnson-Lindenstrauss dimension reduction

Description

Bootstraps list of indices at which change point may have occured in a multi-dimensional time series with normal noise. Samples the time component and interpolates between values when there are repeats. This function has not been thoroughly tested, and is not implemented in several key cases.

Usage

bootJLDetectChangePoint(
  multiSeries,
  reducedDim = 5,
  useGaussian = TRUE,
  setdetail,
  useBFIC = TRUE,
  numRepeat = 100,
  numKeep = 2,
  alpha = 0.05,
  useJL = TRUE,
  rotate_xaxis = FALSE,
  returnPlot = FALSE,
  fast = TRUE
)

Arguments

multiSeries

The high dimensional time series. Should be a matrix, with each row being an observation of the time series.

reducedDim

The dimension you want to project onto. Should be less than the dimension of the time series. Default is 5

useGaussian

Set to TRUE if you want to use a random Gaussian projection. Set to FALSE for random Bernoulli matrix.

setdetail

Optional argument to set the detail level you wish to use. Default is all details.

useBFIC

Optional argument to use BFIC to decide change point location.

numRepeat

Number of times to repeat random projection. Default is 100.

numKeep

The number of indices that are considered significant at each iteration.

alpha

The significance level of the bootstrap.

useJL

Use Johnson-Lindenstrauss dimension reduction. Not currently implemented for useJL = FALSE.

rotate_xaxis

set to TRUE if you wish to rotate the values on the x-axis; will not print out all values

returnPlot

set to TRUE if you wish for the plot to be returned.

fast

set to FALSE if you wish to check every possible change point.

Value

List with values

prop

The proportion of times the BFIC of the bootstrapped time series showed significance.

indices

A table of indices that were in the numKeep most likely change points at least once, together with the number of times that they occured.

sigindices

The indices which occured more often than would be indicated by chance.

q95

Estimate for the cutoff of the number of times indices would have to appear to be included in sigindices.

Examples


multiseries <- createTimeSeries(mu1 = rep(0, 100), mu2 = rep(1,100))
bootJLDetectChangePoint(multiseries) #True change point is at t = 72





speegled/cpbaywave documentation built on Feb. 19, 2024, 11:13 a.m.