This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Calculation of Bayes factor from BEAST

Hi

I ran BEAST with strict and UCLD clock model (Constant, Bayesian skyline and Exponential). I got path sampling measures for all. I need to calculate Bayes factor to select best fit model.

For example, I need to calculate Bayes factor between strict and UCLD Also I need to calculate Bayes factor between (Constant, Bayesian skyline and Exponential)

bayes-factor beast path-sampling

1 answer

Hello,

The Bayes Factor is a ratio of two marginal likelihoods. But the output values from the PS/SS are the log marginal likelihoods (at least using BEAST v1.8). Hence, the difference between the log marginal likelihoods between two models will give you the log Bayes Factor. And that value is what you use to do the model comparison and selection.

Example:

log marginal likelihoods model 1 : -17732.0430 log marginal likelihoods model 2: - 17734.9820

So, log Bayes Factor of model 1 vs model 2 = 2.9390

Which means that model 1 fits your data best.

But I advice you to take at look at this webpage: https://taming-the-beast.org/tutorials/NS-tutorial/

Good luck,

Fabiana

Log in to answer this question.