thresholdBS {changepoints} | R Documentation |
Given a BS object, perform thresholding to find the change point locations.
thresholdBS(BS_object, tau)
BS_object |
A |
tau |
A positive |
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 |
Haotian Xu
BS.univar
, BS.uni.nonpar
, BS.cov
, WBS.univar
, WBS.uni.nonpar
, WBS.multi.nonpar
, WBS.network
, WBSIP.cov
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)