data <- covid_data
# No neighbourhood case
ts_no_nbd <- ts_hdchange(data,
window_size = 30,
m = 8,
h = 1,
N_rep = 999,
alpha = 1e-5,
quantiles = c(0.01, 0.05, 0.1))
# Neighbourhood case
ts_nbd <- ts_hdchange(data,
window_size = 30,
m = 8,
h = 1,
N_rep = 999,
alpha = 1e-5,
quantiles = c(0.01, 0.05, 0.1),
nbd_info = list(c(1:10), c(25:35), c(7:18)))
Run the code above in your browser using DataLab