Description Usage Arguments Details Value Author(s) References See Also Examples
Estimates the density of the difference of two samples at 0. This is necessary for the Hodges-Lehmann (change point) test. See Dehling et al. (2015) for details.
1 2 3 |
x |
univariate numeric vector representing the first sample. |
y |
univariate numeric vector representing the second sample. |
type2 |
character string indicating which differences should be used, to estimate the density. Must be one of 'all', 'within' and 'between', see Details. |
adjust |
numeric which determines the used bandwidth, see the help of |
kernelused |
character string indicating the used kernel, see the help of |
... |
further arguments passed to the respective internal functions. |
The Hodges-Lehmann two sample test requires an estimation of the density of the difference of both random variables X and Y at 0. This is also true for the the Hodges-Lehmann change point test since it consists of a sequence of two samples tests. One approach to estimate this density is to apply a kernel estimator at differences of values of both samples. This is basically the task of this function.
There are different possibilities to build differences:
If type2
is "all"
one uses all possible differences of the merged sample.
If type2
is "within"
one uses all possible differences within the first sample and all possible differences within the second.
If type2
is "between"
one uses all possible differences between one observation of the first sample and one observation of the second.
The density estimation itself is computed by the function density
of the stats
package.
The estimated density at 0.
Roland Fried and Alexander Dürre
Dehling, H., Fried, R., Wendler, M. (2015): A robust method for shift detection in time series, preprint. arXiv 1506.03345
The change point detection functions changerob
and changerob.HL
.
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.