NBISweden / MrBayes

MrBayes is a program for Bayesian inference and model choice across a wide range of phylogenetic and evolutionary models. For documentation and downloading the program, please see the home page:
http://NBISweden.github.io/MrBayes/
GNU General Public License v3.0
234 stars 79 forks source link

Share node age distribution for fossils from the same site #298

Open mcranium opened 7 months ago

mcranium commented 7 months ago

Dear developers, I recently realized that when using tip dating for fossils of $n$ different ages, MrBayes would have to draw from $n$ distributions, despite one could have multiple fossils from the same field site (very common in palaeoentomology and quite common in palaeontology in general). The problems I see with this are: 1) A waste of computational resources 2) The fossils from a single site could do not share the exact same age in the trees

I assume it should generally be possible to let multiple tips share a node age distributions.

However, I did not find any solution, looking through example nexus files and the help files for relevant commands. Also looking at the source code, it seems that the calibrate command is not able to accept multiple tip names for one distribution (e.g. (Jeholornis, Sapeornis) = unif(110.6, 125.0) results in an error message).

Is it possible to achieve this functionality with the existing commands? If not, would it be possible to modify the DoCalibrate function to achieve it?

nylander commented 6 months ago

Dear @mcranium , thank you for your message. Someone else may need to correct me, but I'm not sure I share your concerns. If you specify, e.g., calibrate Jeholornis = unif(110.6, 125.0); calibrate = Sapeornis = unif(110.6, 125.0);, you are using one and the same distribution. You are right, however, that when we sample a new value from that distribution, it needs to be done once for each name. A negligible use of resources it would seem, however. You are also right in the statement that it would be hard to achieve exactly the same estimate for the age of two or more names "from one field site". And this due to the fact that the MCMC-machinery is stochastic by nature. One may, however, agree that two posterior estimates are sufficiently similar to be the same. Just as two fossils found at the same site are judged as being sufficiently close in time. Weather the implementation in MrBayes - and all assumptions around it - would have a large impact in relation to the "same site" assumption would be interesting to test. /Johan

P.S. One may of course "force" calibrations to be similar by concentrating the probability mass around some value when specifying the prior. The modes will, however, still be somewhat different due to the MCMC-error. D.S.