sbs.alg: Sparsified Binary Segmentation

Description Usage Arguments Value References Examples

Description

Perform the Sparsified Binary Segmentation algorithm detecting change-points in the mean or second-order structure of the data.

Usage

1
2
3
sbs.alg(x, cp.type = c(1, 2)[1], thr = NULL, trim = NULL, height = NULL,
  temporal = TRUE, scales = NULL, diag = FALSE, B = 1000, q = 0.01,
  do.parallel = 4)

Arguments

x

input data matrix, with each row representing the component time series

cp.type

cp.type=1 specifies change-points in the mean, cp.type=2 specifies change-points in the second-order structure

thr

pre-defined threshold values; when thr = NULL, bootstrap procedure is employed for the threshold selection; when thr != NULL and cp.type = 1, length(thr) should match nrow(x), if cp.type = 2, length(thr) should match nrow(x)*(nrow(x)+1)/2*length(scales)

trim

length of the intervals trimmed off around the change-point candidates; trim = NULL activates the default choice (trim = round(log(dim(x)[2])))

height

maximum height of the binary tree; height = NULL activates the default choice (height = floor(log(dim(x)[2], 2)/2))

temporal

used when cp.type = 1; if temporal = FALSE, rows of x are scaled by mad estimates, if temporal = TRUE, their long-run variance estimates are used

scales

used when cp.type = 2; negative integers representing Haar wavelet scales to be used for computing nrow(x)*(nrow(x)+1)/2 dimensional wavelet transformation of x; a small negative integer represents a fine scale

diag

used when cp.type = 2; if diag = TRUE, only changes in the diagonal elements of the autocovariance matrices are searched for

B

used when is.null(thr); number of bootstrap samples for threshold selection

q

used when is.null(thr); quantile of bootstrap test statistics to be used for threshold selection

do.parallel

used when is.null(thr); number of copies of R running in parallel, if do.parallel = 0, %do% operator is used, see also foreach

Value

S3 bin.tree object, which contains the following fields:

tree

a list object containing information about the nodes at which change-points are detected

mat

matrix concatenation of the nodes of tree

ecp

estimated change-points

thr

threshold used to construct the tree

References

H. Cho and P. Fryzlewicz (2014) Multiple-change-point detection for high dimensional time series via sparsified binary segmentation. JRSSB, vol. 77, pp. 475–507.

Examples

1
2
3
4
5
6
x <- matrix(rnorm(20*300), nrow=20)
sbs.alg(x, cp.type=2, scales=-1, diag=TRUE, do.parallel=0)$ecp

x <- matrix(rnorm(100*300), nrow=100)
x[1:10, 151:300] <- x[1:10, 151:300]*sqrt(2)
sbs.alg(x, cp.type=2, scales=-1, diag=TRUE, do.parallel=0)$ecp

hdbinseg documentation built on May 2, 2019, 9:13 a.m.

Related to sbs.alg in hdbinseg...