matsengrp / ecgtheow

Ancestral lineage reconstruction using BEAST or RevBayes
2 stars 2 forks source link

Test clock model #10

Open matsen opened 6 years ago

matsen commented 6 years ago

We should run a Bayes Factor test for strict vs uncorrelated lognormal clocks. I don't think that we have enough data to support a more complex model, but worth checking out.

armanbilge commented 6 years ago

I wonder if we can compute the BF by taking the ratio of a BEAST marginal likelihood to e.g. a MrBayes marginal likelihood. This way we can use the unrooted, non-clock tree in MrBayes without fussing with relaxed clocks.

Assuming that the likelihoods calculations are equivalent/comparable (which is reasonable if you run both BEAST and MrBayes with Beagle). It looks like MrBayes can use stepping-stone to compute the marginal likelihood. http://hydrodictyon.eeb.uconn.edu/eebedia/index.php/Phylogenetics:_Morphology_and_Partitioning_in_MrBayes#Estimating_the_marginal_likelihood_using_the_stepping-stone_method

armanbilge commented 6 years ago

You may also need to adjust the marginal likelihoods by a constant ratio, to account for the different number of rooted and unrooted trees on the same number of taxa.

matsen commented 6 years ago

Thanks, @armanbilge ! It's not clear to me that MB does whole-sequence ancestral state reconstruction in the same way that BEAST does. It does ASR, but it seems designed slightly differently. http://mrbayes.sourceforge.net/wiki/index.php?title=Evolutionary_Models_Implemented_in_MrBayes_3&oldid=5249#Ancestral_State_Reconstruction

armanbilge commented 6 years ago

But if we're just comparing (non-)clock models, we don't care about ASR. The ancestral states get marginalized out in the marginal likelihood.

matsen commented 6 years ago

I agree with you about the comparison, but in the end for this project we're interested in doing ASR. Perhaps I don't follow where you are going with this?

armanbilge commented 6 years ago

Sorry, maybe I am confused? I thought the point is to test whether using a clock-like tree is OK. Doing a BF test against MrBayes will show if we have evidence to reject a clock model in favor of no clock. So long as all is good, we can proceed using BEAST for ASR while still sleeping at night.

matsen commented 6 years ago

OK, thanks!

It'll be heaps easier to do a test of BEAST relaxed clocks vs strict clock, but the test you propose seems more stringent.

armanbilge commented 6 years ago

Just my 2 cents, but I'm not 100% sure how easy it'll be to do a relaxed clock in BEAST. It could open up a whole can of mixing issues. Or not. I wouldn't know.