Description Usage Arguments Details Value Author(s) References See Also Examples
Computes the test trajectory for the Hodges-Lehmann change point test. See Dehling et al. (2015) for details.
1 2 | changerob.HL(x, var.method = c("window", "acf", "acfextra"),
overlapping = TRUE, shiftcorrect = TRUE, borderN = 10, ...)
|
x |
numeric vector or univariate time series object. |
var.method |
character string defining the estimator of the long run variance, see Details. |
overlapping |
logical value indicating whether block sums should be distinct or overlapping. Only relevant if |
shiftcorrect |
logical value. If |
borderN |
integer value. If |
... |
further arguments passed to the respective internal function for calculation of the asymptotical long run variance. |
The Hodges-Lehmann change point test is a robust and nonparametric test against a change in location under short range dependence. It is preferable to the usual cusum test if the time series contains outliers or has heavy tails. See Dehling et al. (2015) for details. This function computes the test trajectory, which is basically a series of two sample tests, splitting the time series at every possible change point. The actual test is executed by the function changerob
.
The long run variance of the test statistic consists of two parts, the long run variance of the ranks of the time series sigma and the density at 0 of the difference of two independent random variables which have the same marginal distribution as an observation of the time series u(0). There are several possibilities to estimate both. For the long run variance of the ranks sigma there are three options. More details on the different options for calculating the long run variance are given on the help page of the function changerob
.
For estimating u(0), a classical kernel estimator is used, in fact the function density
of the stats package. There are several possibilities of differences to use. See the help page of densdiff
for more details.
Note that the procedure is computational demanding and can take some time for long time series (with more than 2000 observations).
Numeric vector which contains the whole path of the test statistic.
Roland Fried and Alexander Dürre
Carlstein, E. (1986): The use of subseries values for estimating the variance of a general statistic from a stationary sequence, The Annals of Statistics, vol. 14, 1171–1179, doi: 10.1214/aos/1176350057.
Dehling, H., Fried, R., Wendler, M. (2015): A robust method for shift detection in time series, preprint. arXiv 1506.03345
Peligrad, M., Shao, Q. (1995): Estimation of the Variance of Partial Sums for rho-Mixing Random Variables, Journal of Multivariate Analysis, vol. 152, 140–157, doi: 10.1006/jmva.1995.1008.
The wrapper function changerob
.
The long run variance is calculated by asymvar.window
, asymvar.acf
or asymvar.acfextra
.
The density at 0 for the Hodges-Lehmann estimator is calculated by densdiff
.
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.