detectBinary: Change point detection using PCA and binary segmentation

Description Usage Arguments Value Examples

View source: R/detectBinary.R

Description

This function uses PCA-based method to find breaks. Simultaneous breaks are found from binary segmentation.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
detectBinary(
  Y,
  Del,
  L,
  q = "fixed",
  alpha = 0.05,
  nboot = 199,
  n.cl,
  bsize = "log",
  bootTF = TRUE,
  scaleTF = TRUE,
  diagTF = TRUE,
  plotTF = TRUE
)

Arguments

Y

data: Y = length*dim

Del

Delta away from the boundary restriction

L

the number of factors

q

methods in calculating long-run variance of the test statistic. Defaul is "andrew" "fixed" = length^1/3 or user specify the length

alpha

significance level of the test

nboot

the number of bootstrap sample for pvalue. Defauls is 199.

n.cl

number of cores in parallel computing. The default is (machine cores - 1)

bsize

block size for the Block Wild Boostrapping. Default is log(length), "sqrt" uses sqrt(length), "adaptive" deterines block size usign data dependent selection of Andrews

bootTF

determine whether the threshold is calculated from bootstrap or asymptotic

scaleTF

scale the variance into 1

diagTF

include diagonal term of covariance matrix or not

plotTF

Draw plot to see test statistic and threshold

Value

tstathist The complete history of test tsatistic

Brhist The sequence of breakspoints found from binay splitting

L The number of factors used in the procedure

q The estimated vecorized autocovariance on each regime.

crit The critical vlaue to identify change point

bsize The block size of the bootstrap

diagTF If TRUE, the diagonal entry of covariance matrix is used in detecting connectivity changes.

bootTF If TRUE, boostrap is used to find critical value

scaleTF If TRUE, the multivariate signal is studentized to have zero mean and unit variance.

Examples

1
out3= detectBinary(changesim, L=2, n.cl=1)

detectR documentation built on Feb. 8, 2021, 5:06 p.m.