Description Usage Arguments Details Value References See Also Examples
Openend nonparametric sequential test for changepoint detection based on the retrospective CUSUM statistic. The observations need to be univariate but can be serially dependent. To carry out the test, two steps are required. The first step consists of computing a detector function. The second step consists of comparing the detector function to a suitable constant threshold function. Each of these steps corresponds to one of the functions in the usage section below. The current implementation is preliminary and not optimized for realtime monitoring (but could still be used for that). Details can be found in the third reference.
1 2 3 4 5 
x.learn 
a numeric vector representing the learning sample. 
x 
a numeric vector representing the observations collected after the beginning of the monitoring for a change in mean. 
sigma 
an estimate of the longrun variance of the time series of
which 
b 
strictly positive integer specifying the value of the
bandwidth for the estimation of the longrun variance if

weights 
a string specifying the kernel for creating the weights
used for the estimation of the longrun variance if 
det 
an object of class 
statistic 
a string specifying the statistic/detector to be used
for the monitoring; can be either 
eta 
a real parameter whose role is described in detail in the third reference. 
gamma 
a real parameter that can improve the power of the sequential test at the beginning of the monitoring; possible values are 0, 0.1, 0.25, 0.45, 0.65 and 0.85, but not for all statistics; see the third reference. 
alpha 
the value of the desired significance level for the sequential test. 
plot 
logical indicating whether the monitoring should be plotted. 
The testing procedure is described in detail in the third
reference. An alternative way of estimating the longrun variance is
to use the function lrvar()
of the package
sandwich and to pass it through the argument sigma
.
Both functions return lists whose components have explicit names. The
function monCpMean()
in particular returns a list whose
components are
alarm 
a logical indicating whether the detector function has exceeded the threshold function. 
time.alarm 
an integer corresponding to the time at
which the detector function has exceeded the threshold function or

times.max 
a vector of times at which the successive detectors

time.change 
an integer giving the estimated time of change if

statistic 
the value of 
eta 
the value of 
gamma 
the value of 
alpha 
the value of 
sigma 
the value of 
detector 
the successive values of the chosen detector. 
threshold 
the value of the constant threshold for the chosen detector. 
A. Bücher and I. Kojadinovic (2016), A dependent multiplier bootstrap for the sequential empirical copula process under strong mixing, Bernoulli 22:2, pages 927968, http://arxiv.org/abs/1306.3930.
J. Gösmann, T. Kley and H. Dette (2020), A new approach for openend sequential change point monitoring, 49 pages, http://arxiv.org/abs/1906.03225.
M. Holmes and I. Kojadinovic (2020), Openend nonparametric sequential changepoint detection based on the retrospective CUSUM statistic, 41 pages, available on the arXiv.
D.N. Politis and H. White (2004), Automatic blocklength selection for the dependent bootstrap, Econometric Reviews 23(1), pages 5370.
see cpMean()
for the corresponding a posteriori (offline) test.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26  ## Not run:
## Example of openend montoring
m < 100 # size of the learning sample
## The learning sample
set.seed(123)
x.learn < rnorm(m)
## New observations with a change in mean
## to simulate monitoring for the period m+1, ..., n
n < 5000
k < 2500 ## the true changepoint
x < c(rnorm(km), rnorm(nk, mean = 0.2))
## Step 1: Compute the detector
det < detCpMean(x.learn = x.learn, x = x)
## Step 2: Monitoring with the default detector
m1 < monCpMean(det)
str(m1)
## Monitoring with another detector
m2 < monCpMean(det, statistic = "s", gamma = 0.85)
str(m2)
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.