thresholdBS {changepoints} | R Documentation |
Thresholding a BS object with threshold value tau.
Description
Given a BS object, perform thresholding to find the change point locations.
Usage
thresholdBS(BS_object, tau)
Arguments
BS_object |
A |
tau |
A positive |
Value
A list
with the following structure:
BS_tree_trimmed |
BS_tree with change points which do not satisfy the thresholding criteria removed |
cpt_hat |
A matrix contains change point locations, values of corresponding statistic, and levels at which each change point is detected |
Author(s)
Haotian Xu
See Also
BS.univar
, BS.uni.nonpar
, BS.cov
, WBS.univar
, WBS.uni.nonpar
, WBS.multi.nonpar
, WBS.network
, WBSIP.cov
Examples
y = c(rnorm(100, 0, 1), rnorm(100, 10, 10), rnorm(100, 40, 10))
temp = BS.univar(y, 1, 300, 5)
plot.ts(y)
points(x = tail(temp$S[order(temp$Dval)],4), y = y[tail(temp$S[order(temp$Dval)],4)], col = "red")
thresholdBS(temp, 20)
[Package changepoints version 1.1.0 Index]