gauss.quad: Estimate marginal likelihood by thermodynamic integration

Description Usage Arguments Details Value Author(s) References See Also

View source: R/marginal-lhd.R

Description

Estimate marginal likelihood by thermodynamic integration and Gauss-Legendre quadrature from a sample of n power posterior MCMC chains sampled with mcmctree (or bpp).

Usage

1
gauss.quad(mcmcf = "mcmc.txt", betaf = "beta.txt")

Arguments

mcmcf

character, mcmc output file name

betaf

character, file with beta values

Details

The MCMC samples should be stored in a directory structure created by make.bfctlf with method = "gauss-quad". The function will read the stored log-likelihood values and calculate the log-marginal likelihood.

Numerical integration is done using Gauss-Legendre quadrature. See Rannala and Yang (2017) for details (also dos Reis et al. 2017, Appendix 2).

Value

A list with components logml, the log-marginal likelihood estimate; se, the standard error of the estimate; mean.logl, the mean of log-likelihood values sampled for each beta; and b, the beta values used.

Author(s)

Mario dos Reis

References

Rannala B and Yang Z. (2017) Efficient Bayesian species tree inference under the multispecies coalescent. Systematic Biology 66: 823-842.

dos Reis et al. (2017) Using phylogenomic data to explore the effects of relaxed clocks and calibration strategies on divergence time estimation: Primates as a test case. bioRxiv

See Also

make.bfctlf to prepare directories and mcmctree control files to calculate the power posterior.


dosreislab/mcmc3r documentation built on Oct. 20, 2018, 2:41 a.m.