| Inspect_test_calibrate | R Documentation | 
\xi for single change-point testing using Monte Carlo simulationR wrapper for C function choosing the empirical detection threshold \xi for Inspect \insertCitewang_high_2018;textualHDCD for single change-point testing using Monte Carlo simulation.
Inspect_test_calibrate(
  n,
  p,
  N = 100,
  tol = 1/100,
  lambda = NULL,
  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   | 
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_test_calibrate(n,p,N=100, tol=1/100)
thresholds_emp
# Generating data
X = matrix(rnorm(n*p), ncol = n, nrow=p)
Y = matrix(rnorm(n*p), ncol = n, nrow=p)
# Adding a single sparse change-point to X (and not Y):
X[1:5, 26:n] = X[1:5, 26:n] +2
resX = Inspect_test(X, xi = thresholds_emp$max_value)
resX
resY = Inspect_test(Y,  xi = thresholds_emp$max_value)
resY
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.