single_ESAC | R Documentation |
R wrapper for C function implementing ESAC for single change-point estimation, as described in section 3.1 in \insertCitemoen2023efficient;textualHDCD
single_ESAC(
X,
threshold_d = 1.5,
threshold_s = 1,
rescale_variance = FALSE,
debug = FALSE
)
X |
Matrix of observations, where each row contains a time series |
threshold_d |
Leading constant for |
threshold_s |
Leading constant for |
rescale_variance |
If |
debug |
If |
A list containing
pos |
estimated change-point location |
s |
the value of |
library(HDCD)
n = 500
p = 500
set.seed(101)
# Generating data
X = matrix(rnorm(n*p), ncol = n, nrow=p)
# Adding a single sparse change-point:
X[1:5, 201:500] = X[1:5, 201:500] +1
res = single_ESAC(X,rescale_variance=TRUE)
res$pos
# Manually setting the leading constants for \lambda(t):
# here \lambda(t) = 2 (\sqrt{p \log(n^4)} + \log (n^4)) for t=p
# and = 2 (t \log (ep\log n^4 / t^2) + \log(n^4))
res = single_ESAC(X, threshold_d = 2, threshold_s = 2)
res$pos
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.