remix_kldiv: Estimate the Kullback-Leibler divergence between priors and...

Description Usage Arguments Details Value Author(s)

View source: R/remix_kldiv.R

Description

Estimate the Kullback-Leibler divergence between priors and posteriors

Estimate the multivariate Kullback-Leibler divergence between priors and posteriors

Usage

1
2
3
remix_kldiv(simmr_out, prior.control, plot.dens = TRUE, ...)

remix_mkldiv(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.

...

other arguments to BayeSens::kldiv.

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.

...

other arguments to BayeSens::kldiv.

Details

Kullback-Leibler divergence is a measure of the information divergence between two distributions (densities). Units are bits. #' Kullback-Leibler divergence is approximated in by binning the random variates and calculating the Kullback-Leibler divergence for discrete distributions.

It is recommended to visually check distribution fits, particularly if the number of random variates is small. See kldiv from package BayeSens for more details on Kullback-Leibler divergence. 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.

Kullback-Leibler divergence is a measure of the information divergence between two distributions (densities). Units are bits. #' Kullback-Leibler divergence is approximated in by binning the random variates and calculating the Kullback-Leibler divergence for discrete distributions.

It is recommended to visually check distribution fits, particularly if the number of random variates is small. See kldiv from package BayeSens for more details on Kullback-Leibler divergence. 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 Kullback-Leibler divergences between each source's prior and posterior distributions.

A data.frame containing the Kullback-Leibler divergences between each source's prior and posterior distributions.

Author(s)

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

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


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