remix_hellinger: Estimate the Hellinger distance between priors and posteriors

Description Usage Arguments Details Value Author(s)

View source: R/remix_hellinger.R

Description

Estimate the Hellinger distance between priors and posteriors

Usage

1
remix_hellinger(simmr_out, prior.control, plot.dens = TRUE)

Arguments

simmr_out

A simmr_output object, the output of simmr_mcmc

prior.control

A prior.control data.frame for simmr_mcmc

plot.dens

A logical giving whether densities are plotted.

Details

Hellinger distance is a metric of the distance between two distributions (densities). Values of 0 indicate the distributions are identical. A value of 1 indicates that one distribution takes a value of zero everywhere that the other distribution takes a positive value.

For isotope mixing models, values approaching 1 indicate the prior has decreasing influence on the posterior. In general

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.

In cases of large discrepencies, the discrete metric is recommended. Large discrepencies probably indicate multi-modal distributions.

It is recommended to visually check distribution fits, particularly if the number of random variates is small. See hellinger from package BayeSens for more details on Hellinger distance. See plot_dists if you want to plot the densities too.

In general these methods will be inaccurate if analysis is performed on too few samples, e.g. <10 000. >100 000 would be ideal.

Value

A data.frame containing the Hellinger distances between each source's prior and posterior distributions.

Author(s)

Christopher J. Brown christo.j.brown@gmail.com


cbrown5/remixsiar documentation built on April 26, 2020, 12:40 a.m.