single_SBS | R Documentation |
R wrapper for C function for single change-point estimation using Sparsified Binary Segmentation \insertCitecho_multiple-change-point_2015;textualHDCD.
single_SBS(
X,
threshold = NULL,
rescale_variance = TRUE,
empirical = FALSE,
N = 100,
tol = 1/100,
debug = FALSE
)
X |
Matrix of observations, where each row contains a time series |
threshold |
Manually specified value of the threshold |
rescale_variance |
If |
empirical |
If |
N |
If |
tol |
If |
debug |
If |
A list containing
pos |
estimated change-point location |
maxval |
maximum thresholded and aggregated CUSUM at the estimated change-point position |
# Single SBS
library(HDCD)
n = 50
p = 50
set.seed(101)
# Generating data
X = matrix(rnorm(n*p), ncol = n, nrow=p)
# Adding a single sparse change-point:
X[1:5, 26:n] = X[1:5, 26:n] +1
res = single_SBS(X,threshold=7,rescale_variance=TRUE)
res$pos
# Choose threhsold by Monte Carlo:
res = single_SBS(X,empirical=TRUE,rescale_variance=TRUE)
res$pos
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.