tuneBSuninonpar {changepoints} | R Documentation |
Wild binary segmentation for univariate nonparametric change points detection with tuning parameter selection.
Description
Perform wild binary segmentation with tuning parameter selection based on sample splitting.
Usage
tuneBSuninonpar(BS_object, Y, N)
Arguments
BS_object |
A "BS" object produced by |
Y |
A |
N |
A |
Value
A vector of estimated change points (sorted in strictly increasing order).
Author(s)
Oscar Hernan Madrid Padilla & Haotian Xu
References
Padilla, Yu, Wang and Rinaldo (2021) <doi:10.1214/21-EJS1809>.
See Also
BS.uni.nonpar
and WBS.uni.nonpar
.
Examples
Y = t(as.matrix(c(rnorm(100, 0, 1), rnorm(100, 0, 10), rnorm(50, 0, 40))))
W = Y # W is a copy of the matrix Y, it can be Y itself.
N = rep(1, 250)
M = 5
set.seed(123)
intervals = WBS.intervals(M = M, lower = 1, upper = ncol(Y))
BS_object = WBS.uni.nonpar(W, 1, ncol(Y), intervals$Alpha, intervals$Beta, N, delta = 5)
cpt_hat = tuneBSuninonpar(BS_object, Y, N)
[Package changepoints version 1.1.0 Index]