oneBkp: Get best candidate change point

Description Usage Arguments Author(s) Examples

Description

Get best candidate change point according to binary segmentation

Usage

1
oneBkp(Y, weights = NULL, verbose = FALSE)

Arguments

Y

A n*p matrix, p signals of length n to be segmented (centered by column)

weights

a (n-1)*1 vector of weights for the candidate change point positions. Default weights yield the likelihood ratio test (LRT) statistic for the identification of a single change point.

verbose

A logical value: should extra information be output ? Defaults to FALSE.

Author(s)

Morgane Pierre-Jean and Pierre Neuvial

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
p <- 2
sim <- randomProfile(1e4, 1, 1, p)
Y <- sim$profile
bkp <- jointseg:::oneBkp(Y)
par(mfrow=c(p,1))
for (ii in 1:p) {
    plot(Y[, ii], pch=19, cex=0.2)
    abline(v=bkp, col=3)
    abline(v=sim$bkp, col=8, lty=2)
}

mpierrejean/jointseg documentation built on May 23, 2019, 6:30 a.m.