# Overview

This tutorial aims to guide you through different options for calibrating species divergences to time using RevBayes. The exercises are based on a dataset of bears (family Ursidae) for which we have molecular sequence data for extant species, morphological data for extant and fossil species, and information about fossil sampling times. The material used in this tutorial is directly taken from three others that explore some of the topics in more detail.

In exercises 1 and 2 we’ll use the molecular sequence data to infer the relationships among living species and transform the branch lengths assuming a strict or relaxed clock model. Since these analyses don’t incorporate any information from the geological record, this approach can only be used to infer the relative age of speciation events.

In exercises 3 and 4 we’ll use information from the fossil record to calibrate the tree to absolute time using two different approaches to calibration (node dating versus the fossilized birth-death process). Finally, in exercise 5 we’ll also incorporate the morphological data to infer the relationships and divergence times among living and fossil bear species (total-evidence dating).

### The data

Create a directory on your computer for this tutorial. In this directory, create a subdirectory called data, and download the data files that you can find on the left of this page.

In the data folder, you should now have the following files:

• bears_cytb.nex: an alignment in NEXUS format of 1,000 bp of cytochrome b sequences for 8 living bear species.

• bears_morphology.nex: a matrix of 62 discrete, binary (coded 0 or 1) morphological characters for 18 species of fossil and extant bears.

• bears_taxa.tsv: a tab-separated table listing every bear species (both fossil and extant) and their stratigraphic age ranges. For extant taxa, the minimum age is 0.0 (i.e. the present).

### Scripts

For more complex models and analyses, it’s useful to create separate Rev scripts that contain all the model parameters, moves, and functions for different model components (e.g. the substitution model and the clock model).

Create another subdirectory called scripts.

In this tutorial, you will work primarily in your text editor and create a set of modular files that can be easily managed and interchanged. Examples of all the commands used to perform each analysis are also provided at the top of this page under Scripts but try to write the complete scripts yourself from the beginning to ensure you understand all the steps involved and the differences between setting up each analysis.

### Exercises

Click on the first exercise to begin!