View source: R/univariate_nonparametric.R
WBS.uni.nonpar | R Documentation |
Perform wild binary segmentation for univariate nonparametric change points detection.
WBS.uni.nonpar(Y, s, e, Alpha, Beta, N, delta, level = 0)
Y |
A |
s |
A |
e |
A |
Alpha |
A |
Beta |
A |
N |
A |
delta |
A positive |
level |
Should be fixed as 0. |
A list
with the following structure:
S |
A vector of estimated change points (sorted in strictly increasing order) |
Dval |
A vector of values of CUSUM statistic based on KS distance |
Level |
A vector representing the levels at which each change point is detected |
Parent |
A matrix with the starting indices on the first row and the ending indices on the second row |
Oscar Hernan Madrid Padilla, Haotian Xu
Padilla, Yu, Wang and Rinaldo (2021) <doi:10.1214/21-EJS1809>.
thresholdBS
for obtaining change points estimation, tuneBSuninonpar
for a tuning version.
Y = t(as.matrix(c(rnorm(100, 0, 1), rnorm(100, 0, 10), rnorm(100, 0, 40)))) N = rep(1, 300) M = 20 intervals = WBS.intervals(M = M, lower = 1, upper = ncol(Y)) temp = WBS.uni.nonpar(Y, 1, 300, intervals$Alpha, intervals$Beta, N, 5) plot.ts(t(Y)) points(x = tail(temp$S[order(temp$Dval)], 4), y = Y[,tail(temp$S[order(temp$Dval)],4)], col = "red") thresholdBS(temp, 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.