Code

FPK: a general model of trait evolution on phylogenies in macroevolutionary landscapes of any shape

Together with several colleagues, we have developped a general macroevolutionary model in which a continuous trait evolves under deterministic forces that can be of any shape one can imagine (Boucher et al. 2018 Syst. Biol.). This model, which we label FPK for 'Fokker-Planck-Kolmogorov' is an generalization of all current processes of trait evolution on phylogenies: Brownian motion, bounded Brownian motion, and the Ornstein-Uhlenbeck process. FPK is an important addition to the current toolbox since it allows inferring scenarios that were yet not possible to study with neontological data only, like directional trends, disruptive selection, or adaptive landscape with two co-existing optima.

R code to fit the model to comparative data can be found on https://github.com/fcboucher/BBMV along with a tutorial and the whole code is also available as a package on CRAN: https://CRAN.R-project.org/package=BBMV.


Bounded Brownian Motion

Together with Dr. Vincent Démery we have developed a new model for the evolution of continuous traits on phylogenies, which consists in Brownian motion between two reflective bounds, which we labeled BBM (Boucher & Démery 2016 Syst. Biol.). BBM is an interesting alternative to existing models of evolution, and in particular to the Ornstein-Uhlenbeck model since it also models evolutionary constraints on the trait, but of a very different type. You can find the R code to fit the model to empirical data on https://github.com/fcboucher/BBM along with a tutorial.


Measuring rates of dispersal or divergence across an entire biota

I have written some R code to implement different forms of the likelihood function used by Bacon et al. 2015 Proc. Nat. Acad. Sci., which we have used in the following paper: Husson et al. 2020 J. Biogeo.. This function models a series of events (e.g. divergence times, dated migration events, etc.) as arising from a Poisson process and infers the most likely rate at which they happened. This model is typically useful for studying the rate at which some events (e.g. divergence, dispersal) happened across an entire biota (i.e. in widely different clades) rather than within a single clade.

The derivation of this likelihood function is described in the Supplementary Information of the paper by Bacon et al. (section 1.6) and is due to the authors of this paper. I'm only responsible for this R implementation of this function, which you can find here: https://github.com/fcboucher/Poisson-rates-whole-biotas.