Description Usage Arguments Details Value Author(s)
Parametric estimation of the Hellinger distance between two random variates
1 |
x1 |
A |
x2 |
An optional |
params |
An optional |
densfun |
A |
Hellinger distance is approximated by fitting distributions using
MASS::fitdistr
and then calculating the exact Hellinger distance
given the fitted parameters. Currently the only options are to compare two Beta distributions or two normal distributions (the default).
If params
is given the second density function will be specified
exactly. If x2
is given, the second density function will be estimate from the random variate.
If using params
the parameters should be the mean and sd
(ie c(mean, sd)
) in that order for 'normal' density and a and
b for the beta distribution (ie c(a, b)
) in that order.
'
Class helldistp
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 helldistp object containing approximate Hellinger distances and
fitted density kernals.
hdist
Estimate of Hellinger distance
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.