Description Usage Arguments Details Value Author(s)
Estimate the Hellinger distance between two random variates
1 2 |
x1 |
A |
x2 |
A |
nbreaks |
A single |
minx |
A single |
maxx |
A single |
Hellinger distance is approximated in two ways:
(1) by binning the random variates and calculating the Hellinger distance for discrete distributions and
(2) by creating a continuous approximation of the distributions using
density
and then using numerical integration to calculate the
Hellinger distance.
Method (2) - continuous integration - should in genernal be more accurate however, it may give poor approximations for multi-modal distributions.
Continuous integration may return NaN if the distributions are near identical.
Class helldist
has a plot method that can be used to compared the
discrete and continuous distribution fits.
It is recommended to visually check distribution fits, particularly if the number of random variates is small.
In general these methods will be inaccurate if analysis is performed on too few samples, e.g. <10 000. >100 000 would be ideal.
A helldist object containing approximate Hellinger distances and fitted density kernals.
hdist_disc |
Estimate of Hellinger distance using discrete approximation of the distributions |
hdist_cont |
Estimate of Hellinger distance using continous approximation of distributions |
Christopher J. Brown christo.j.brown@gmail.com
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.