stepping.stones: Estimate marginal likelihood by stepping stones

View source: R/marginal-lhd.R

stepping.stonesR Documentation

Estimate marginal likelihood by stepping stones

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

stepping.stones(mcmcf = "mcmc.txt", betaf = "beta.txt", se = TRUE)

Arguments

mcmcf

character, mcmc output file name

betaf

character, file with beta values

se

logical, whether to calculate the standard error

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.

If se = TRUE, 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 or bpp control files to calculate the power posterior.


dosreislab/mcmc3r documentation built on March 29, 2024, 6:45 p.m.