Tutorial modules


This page is intended to guide users in assembling a set of tutorials that will help them learn how to use RevBayes for a given analysis. Each module lists the tutorials that focus on a particular topic, as well as those that will provide prerequisite knowledge or resources for deeper learning.
We encourage users with no RevBayes experience to start with the RevBayes fundamentals module.

To see all available tutorials, including the ones for which modules are not currently written, go to the full tutorials page.

RevBayes fundamentals

This module is for users who have no experience with RevBayes. The tutorials contained here walk the user through the basics of installing and using RevBayes, and some of the theory behind RevBayes analyses.

  1. Getting started with RevBayes. This tutorial includes getting RevBayes working on your machine, and learning about the fundamentals of setting up models in the software.
  2. MCMC fundamentals. Three tutorials lay out the basics of Markov Chain Monte Carlo analysis in RevBayes, using three different examples: Airline fatalities, coin flips, and archery. It is recommended that absolute beginners go through all three.

By the end of this module, you should be able to build RevBayes, write simple Rev code, and build simple models on which to run MCMC analyses. From here, you can select the module(s) below that best represent your interests and intended analyses.

MCMC assessment

This module is for users looking to debug or analyze their MCMC results deeper. The tutorials will walk the user through best practices when analyzing posterior samples, and tips on how to improve your analyses if your analysis has not converged.

  1. Assessing convergence of your MCMC results: Convergence assessment. This tutorial will walk you through theory and examples on how to assess the convergence of your MCMC chain.
  2. Practical exercises on assessing convergence: Debugging your MCMC. This tutorial contains more exercises on assessing convergence, and provides tips on how to improve convergence in your analysis.

Molecular phylogenetic inference

This module is intended for users looking to infer a phylogenetic tree using molecular (DNA) data. Users will learn how to set up basic molecular evolution model, and be presented with more advanced tutorials to tailor their learning to their desired analyses.

  1. Theoretical background: Understanding continuous-time Markov models. This tutorial will get you up to speed with the theory behind molecular evolution models.
  2. Basic molecular phylogenetic inference: Nucleotide substitution models. This tutorial will walk you through a simple example of molecular phylogeny inference.

By the end of this module, you should be able to infer a phylogenetic tree with a simple molecular evolution model. Depending on your interests, you will also have learned about how to set up partitioned models, and choose the best models for your dataset.

Polymorphism-aware molecular phylogenetics

This module is intended for users looking to infer a phylogenetic tree using molecular data including polymorphisms. Users will learn how to modify their molecular evolution models to account for the presence of polymorphisms in the dataset, including, if desired, balanced selection. Note that the tutorials in this module use code on a separate RevBayes branch, requiring users to run git checkout dev_PoMo_SNP within their local RevBayes repo before running analyses.

  1. Polymorphism-aware phylogenetic models.

Morphological phylogenetic inference

This module is intended for users looking to infer a phylogenetic tree using morphological data. Users will learn how to set up basic morphological evolution models, including for characters with more than two states.

  1. Theoretical background: Understanding continuous-time Markov models. This tutorial will get you up to speed with the theory behind morphological evolution models.
  2. Morphological phylogenetics with binary traits: Tree inference with discrete morphology. This tutorial will walk you through a simple example of morphological phylogeny inference, using only binary (i.e. two-state) characters.
  3. Expanding your dataset: Multistate characters. This tutorial will teach you how to accommodate characters with more than two states in your morphological phylogenetics analyses.

Dating a phylogeny

This module is intended for users looking to date a time-calibrated phylogenetic tree. Users will learn how to set up analyses using both molecular clocks and fossil data for node dating.

  1. Master dating tutorial: Dating trees. This tutorial includes:
  2. Bringing it all together: Relaxed clocks & time trees. This tutorial walks the user through a full analysis, including performing model selection between multiple clock models.

Estimating diversification rates

This module is intended for users looking to infer rates of speciation and extinction. Users will learn how to set up analyses using models in the birth-death model family, including the use of fossil data. While most of the tutorials here assume a fixed phylogenetic tree, some recommendations are made to point the user towards the direction of joint estimation as well.

  1. Theoretical background: Introduction to diversification rate estimation. This tutorial will walk you through the theory behind the birth-death models used in the following tutorials.
  2. Constant-rate models: Simple diversification-rate estimation. This tutorial will walk you through the basics of setting up a birth-death model for estimating rates of speciation and extinction from a fixed phylogenetic tree.

The following tutorials are to be picked based on your intended analyses, as they lay out different hypotheses regarding diversification dynamics and how to set up a BD model to test those.

Total-evidence analysis with tip-dating

This module is intended for users looking to infer a time-calibrated phylogenetic tree with both molecular and fossil data, and fossil ages.

  1. The fossilized birth-death model. This tutorial will push you to put together the skills learned in many previous tutorials, including setting up molecular and morphological evolution, clock, and birth-death models.

State-dependent diversification-rate estimation

This module is intended for users looking to infer trait-dependent diversification rates using the state-dependent speciation and extinction (SSE) model family. As with Estimating diversification rates, the tutorials assume a fixed tree, but tips are included for joint estimation.

  1. Theoretical background: Background on state-dependent diversification-rate estimation. This tutorial will introduce you to the theory behind the SSE model family, building from the fundamentals on BD models you learned on the Estimating diversification rates module.
  2. Testing the effects of discrete traits on diversification: State-dependent diversification with BiSSE and MuSSE. This tutorial will walk you through the setup of the simplest SSE models: binary and multiple SSE (BiSSE and MuSSE), which are used to test the effects of binary and multiple state discrete traits on diversification, respectively.

Ancestral-state estimation

This module is intended for users looking to estimate the ancestral state of species in a fixed phylogenetic tree. Tutorials assume a fixed tree, and no diversification-rate estimation, but tips in that direction are provided.

  1. Theoretical background: Introduction to Discrete Morphology Evolution. This tutorial will introduce you to the ancestral-state estimation (ASE) exercises in RevBayes.
  2. Simple ASE. This tutorial will walk you through the set up and analysis of a simple ASE model, with equal transition rates between all states.
  3. Independent rates: ASE with the independent-rates model. This tutorial builds on the previous one by including the possibility that rates are independent, providing more biological realism to your model. You can easily modify this model to allow only a subset of the rates to be free to vary.
  4. Irreversibility: ASE and irreversibility. This tutorial adds one more piece of complexity that is often useful in ASE models–irreversibility, i.e. ensuring some state transitions are not reversible.
  5. Worked example: Mammals and placenta type. This tutorial provides an example of ASE with irreversibility for the estimation of placenta types in mammals. As an exercise, try modifying the script to allow to make the free-rates model into an independent-rates model.

Continuous trait evolution

This module is intended for users looking to estimate rates of evolution for continuous traits. The tutorials assume a fixed phylogenetic tree. While ways to jointly estimate diversification-rates and/or topology with evolutionary rates are possible, there is no current tutorial that applies that in a straightforward manner. If you are interested in setting up such an analysis, please start a discussion at our GitHub Discussions page for guidance.

  1. Theoretical background: Introduction to Models of Continuous-Character Evolution. This tutorial will introduce you to the continuous-trait evolutionary-rate estimation exercises in RevBayes.
  2. Simple Brownian rate estimation. This tutorial will walk you through a simple analysis of continuous-trait rate estimation assuming Brownian motion, i.e. assuming the trait is evolving randomly, with no directional trend.
  3. Ornstein-Uhlenbeck models. This tutorial will walk you through a slightly more complicated example, using an Ornstein-Uhlenbeck (OU) model instead of a Brownian motion model. OU models expand Brownian motion models in assuming an optimal trait value, such that evolution towards that optimum is more likely than evolution away from it.