powered by
Estimate the Hellinger distance between two random samples whose underdyling distributions are continuous.
hellinger(x, y, lower = -Inf, upper = Inf, method = 1, ...)
numeric. A vector giving the first sample.
numeric. A vector giving the second sample.
numeric. Lower limit passed to integrate.
integrate
numeric. Upper limit passed to integrate.
integer. If method = 1, the usual definition of the Hellinger distance is used; if method = 2, an alternative formula is used.
method = 1
method = 2
Additional parameters to be passed to densityfun.
densityfun
A numeric value, the Hellinger distance.
Probability density functions are estimated with densityfun. Then numeric integration is performed with integrate.
https://en.wikipedia.org/wiki/Hellinger_distance.
HellingerDist in package distrEx.
HellingerDist
# NOT RUN { x <- rnorm(200, 0, 2) y <- rnorm(1000, 10, 15) hellinger(x, y, -Inf, Inf) hellinger(x, y, -Inf, Inf, method = 2) # }
Run the code above in your browser using DataLab