test_existence: Test the existence of change-points in the data

View source: R/main_functions.R

test_existenceR Documentation

Test the existence of change-points in the data

Description

Test the existence of change-points in the data

Usage

test_existence(hdobj, display = TRUE)

Arguments

hdobj

An S3 object of class 'no_nbd' or 'nbd' generated by ts_hdchange().

display

A logical. If 'display = TRUE', the test statistics and critical values will be printed.

Details

See hdchange() for examples.

Value

A list containing the following elements:

  • 'test_stats' The test statistics \mathcal{\boldsymbol{Q}}_{n}.

  • 'critical_values' The critical values.

  • 'stat_all' An array of |V_{i}|_{2}^{2}.

  • 'critical_value_alpha' The threshold value \omega depending on alpha.

References

Li, J., Chen, L., Wang, W. and Wu, W.B., 2022. \ell^2 Inference for Change Points in High-Dimensional Time Series via a Two-Way MOSUM. arXiv preprint arXiv:2208.13074.

Examples

# generate data
data_no_nbd <- sim_hdchange_no_nbd(n = 200,
p = 30,
S = 30,
tau = c(40, 100, 160),
dist_info =
  list(dist = "normal", dependence = "MA_inf", param = 1),
jump_max = c(2, 2, 1.5))

# construct no_nbd object
ts_no_nbd <- ts_hdchange(data_no_nbd,
window_size = 30,
m = 8,
h = 1,
N_rep = 999,
alpha = 1e-5,
quantiles = c(0.01, 0.05, 0.1))

test <- test_existence(ts_no_nbd, display = TRUE)


L2hdchange documentation built on July 26, 2023, 6:06 p.m.