hellinger {statip} | R Documentation |
Estimate the Hellinger distance between two random samples whose underdyling distributions are continuous.
hellinger(x, y, lower = -Inf, upper = Inf, method = 1, ...)
x |
numeric. A vector giving the first sample. |
y |
numeric. A vector giving the second sample. |
lower |
numeric. Lower limit passed to |
upper |
numeric. Upper limit passed to |
method |
integer. If |
... |
Additional parameters to be passed to |
Probability density functions are estimated with
densityfun
.
Then numeric integration is performed with integrate
.
A numeric value, the Hellinger distance.
https://en.wikipedia.org/wiki/Hellinger_distance.
HellingerDist
in package distrEx.
x <- rnorm(200, 0, 2)
y <- rnorm(1000, 10, 15)
hellinger(x, y, -Inf, Inf)
hellinger(x, y, -Inf, Inf, method = 2)