sbs: Change-point detection via standard Binary Segmentation

Description Usage Arguments Value Examples

Description

The function applies the Binary Segmentation algorithm to identify potential locations of the change-points in the mean of the input vector x. The object returned by this routine can be further passed to the changepoints function, which finds the final estimate of the change-points based on thresholding.

Usage

1
2
3
4
sbs(x, ...)

## Default S3 method:
sbs(x, ...)

Arguments

x

a numeric vector

...

not in use

Value

an object of class "sbs", which contains the following fields

x

the vector provided

n

the length of x

res

a 6-column matrix with results, where 's' and 'e' denote start- end points of the intervals in which change-points candidates 'cpt' have been found; column 'CUSUM' contains corresponding value of CUSUM statistic; 'min.th' is the smallest threshold value for which given change-point candidate would be not added to the set of estimated change-points; the last column is the scale at which the change-point has been found

Examples

1
2
3
4
5
6
7
x <- rnorm(300) + c(rep(1,50),rep(0,250))
s <- sbs(x)
s.cpt <- changepoints(s)
s.cpt
th <- c(s.cpt$th,0.7*s.cpt$th) 
s.cpt <- changepoints(s,th=th)
s.cpt

Example output

$sigma
[1] 0.9516706

$th
[1] 4.178558

$no.cpt.th
[1] 1

$cpt.th
$cpt.th[[1]]
[1] 49


$Kmax
[1] 1

$sigma
[1] 0.9516706

$th
[1] 2.924991 4.178558

$no.cpt.th
[1] 1 1

$cpt.th
$cpt.th[[1]]
[1] 49

$cpt.th[[2]]
[1] 49


$Kmax
[1] 1

wbs documentation built on May 15, 2019, 1:04 a.m.