stepping.stones: Estimate marginal likelihood by stepping stones

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

View source: R/marginal-lhd.R

Description

Estimate the marginal likelihood using the stepping stones method from a sample of n power posterior MCMC chains sampled with mcmctree (or bpp).

Usage

1
stepping.stones(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 = "step-stones". The function will read the stored log-likelihood values and calculate the log-marginal likelihood.

An approximation based on the Delta method is used to calculate the standard error (see Xie et al. 2011). Warnings are given if the approximation appears unreliable.

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

Xie et al. (2011) Improving marginal likelihood estimation for Bayesian phylogenetic model selection. Systematic Biology, 60: 150–160.

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.