gauss.quad | R Documentation |
Estimate marginal likelihood by thermodynamic integration and Gauss-Legendre
quadrature from a sample of n
power posterior MCMC chains sampled
with mcmctree (or bpp).
gauss.quad(mcmcf = "mcmc.txt", betaf = "beta.txt", se = TRUE)
mcmcf |
character, mcmc output file name |
betaf |
character, file with beta values |
se |
logical, whether to calculate the standard error |
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).
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.
Mario dos Reis
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
make.bfctlf
to prepare directories and mcmctree or bpp control
files to calculate the power posterior.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.