This function implements the getData
function to
perform the online changepoint detection for the 'Chan' class.
Chan_update(x_new, X_recent, CUSUM, p0, w, lambda)
a new data point
matrix of w
most recent observations
tail partial sums of different lengths to be tracked online
sparsity parameter
window parameter
a tuning parameter for the 'Chan' method
a list of
stat: test statistic for the 'Chan' class.
X_recent: the updated X_recent matrix
CUSUM: the updated CUSUM matrix
Chan, H. P. (2017) Optimal sequential detection in multi-stream data. Ann. Statist., 45, 2736--2763.