Inspect_calibrate | R Documentation |
\xi
using Monte Carlo simulationR wrapper for C function choosing empirical detection threshold \xi
for the Narrowest-Over-Threshold variant of Inspect \insertCite@as specified in section 4.2 in @moen2023efficientHDCD using Monte Carlo simulation.
Inspect_calibrate(
n,
p,
N = 100,
tol = 1/100,
lambda = NULL,
alpha = 1.5,
K = 5,
eps = 1e-10,
maxiter = 10000,
rescale_variance = TRUE,
debug = FALSE
)
n |
Number of observations |
p |
Number time series |
N |
Number of Monte Carlo samples used |
tol |
False positive probability tolerance |
lambda |
Manually specified value of |
alpha |
Parameter for generating seeded intervals |
K |
Parameter for generating seeded intervals |
eps |
Threshold for declaring numerical convergence of the power method |
maxiter |
Maximum number of iterations for the power method |
rescale_variance |
If |
debug |
If |
A list containing
max_value |
the empirical threshold |
library(HDCD)
n = 50
p = 50
set.seed(100)
thresholds_emp = Inspect_calibrate(n,p, N=100, tol=1/100)
thresholds_emp$max_value # xi
# 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] +2
res = Inspect(X, xi = thresholds_emp$max_value)
res$changepoints
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.