H: Hellinger distance between two probability densities

View source: R/H.R

HR Documentation

Hellinger distance between two probability densities

Description

Computes the Hellinger distance between the two probability density functions specified using numerical integration.

Usage

H(dens1, dens2, lower=-Inf)

Arguments

dens1

function returning the first probability density.

dens2

function returning the second probability density.

lower

lower end of the common domain of two density functions. Usually equal to -\infty or 0.

Details

The Hellinger distance is defined in Le Cam (1986) and also given in Roos et al. (2015, Sect. 2.1).

Value

A real number in [0,1].

References

Le Cam, L. (1986). Asymptotic Methods in Statistical Decision Theory. Springer.

Roos, M., Martins, T., Held, L., Rue, H. (2015). Sensitivity analysis for Bayesian hierarchical models. Bayesian Analysis 10(2), 321–349. https://projecteuclid.org/euclid.ba/1422884977

See Also

H_normal

Examples

H(dens1=function(x) dhalfnormal(x, scale=0.5),
  dens2=function(x) dhalfnormal(x, scale=1), lower=0)
H(dens1=function(x) dhalfnormal(x, scale=0.5),
  dens2=function(x) dhalfcauchy(x, scale=1), lower=0)

ra4bayesmeta documentation built on Oct. 7, 2023, 1:07 a.m.