The function performs a Huberized CUSUM test. First the data is transformed by a suitable psi-function. To detect changes in location one can apply fun = "HLm"
, "HLg"
, "VLm"
or "VLg"
, for changes in scale fun = "HCm"
is avaliable and for changes in the dependence respectively covariance structure fun = "HCm"
, "HCg"
, "VCm"
and "VCg"
are possible. The actual definitions of the psi-functions can be found in the help page of psi
. Denote \(Y_1,\ldots,Y_n\) the transformed time series. If \(Y_1\) is one dimensional, then the teststatistik
$$V=\max_{k=1,\ldots,n} \frac{1}{\sqrt{n}\sigma} |\sum_{i=1}^k Y_i-\frac{k}{n} \sum_{i=1}^n Y_i|
$$
is calculated, where \(\sigma^2\) is an estimator for the long run variance, see the help function of sigma2
for details. \(V\) is asymptoticaly Kolmogorov-Smirnov distributed. We use a finite sample correction \(V+0.58/\sqrt{n}\) to improve finite sample performance.
If \(Y[1]\) is multivariate, then the test statistic
$$W=\max_{k=1,\ldots,n} \frac{1}{n}(\sum_{i=1}^k Y_i-\frac{k}{n} \sum_{i=1}^n Y_i)^T\Sigma^{-1}(\sum_{i=1}^k Y_i-\frac{k}{n} \sum_{i=1}^n Y_i)
$$
is computed, where \(\Sigma\) is the long run covariance, see also sigma2
for details. \(W\) is asymptotically distributed like the maximum of a squared Bessel bridge. We use the identity derived in Kiefer to derive p-values. Like in the one dimensional case we use a finite sample correction \((\sqrt{W}+0.58/\sqrt{n})^2\).