critval: critical value for selection rate. Default value is 5. Specifically, to compute the selection rate, a selected break point is counted as a ``success'' for the j-th true break point, tj, if it falls in the interval [tj−(tj−tj−1)/critval,tj+(tj+1−tj)/critval], j=1,…,m0.
Returns
a matrix of detection summary results, including the absolute error, selection rate and relative location. The absolute error of the locations of the estimated break points is defined as errorj=∣t~jf−tj∣, j=1,…,m0.
Examples
# an example of 10 replicates resultset.seed(1)nob <-1000brk <- c(333,666, nob+1)cp.list <- vector('list',10)for(i in1:10){ cp.list[[i]]<- brk[1:2]+ sample(c(-50:50),1)}# some replicate fails to detect all the change pointcp.list[[2]]<- cp.list[[2]][1]cp.list[4]<- list(NULL)# setting 4'th element to NULL.# some replicate overestimate the number of change pointcp.list[[3]]<- c(cp.list[[3]],800)cp.list
res <- detection_check(cp.list, brk, nob, critval =5)res
# use a stricter critical valueres <- detection_check(cp.list, brk, nob, critval =10)res