Research  |   Contributions  |   Matrices  |   Methods  |   Library  |   Photos  |   Links  
Methods > Dating phylogenetic trees

Dating phylogenetic trees of fossil taxa


To date a phylogenetic tree of fossil taxa and provide a treefile with branch lengths scaled to time.

Data required

A treefile with branch lengths scaled to number of character changes and first appearance dates (in millions of years) for each taxon.


The standard method of dating a phylogenetic tree of fossil occurrences is to make each internal node the age of its oldest descendant. However, in practical terms this means many branches have a duration of zero million years (as a hypothetical ancestor and its immediate descendant will have the same age). In fact each bifurcation will always have at least one such zero duration branch and consequently at least half of the branches in a tree are zero duration in length. Aside from being unrealistic this complicates any measure of a "rate between cladogenetic events" (Cloutier 1991, p28) as the divisor is zero, meaning rates can only be zero or infinity. A simple solution to this problem was arrived at independently by Derstler (1982) and Forey (1988), which was to add some constant to the divisor in each case. However, the size of this constant varies between authors. Derstler (1982) used 1 million years, Forey (1988) 5 million years and Cloutier (1991) 2 million years. However, in application these approaches all suffer from the problem of creating large amounts of unsampled history. This is exacerbated in very speciose or very asymmetric phylogenies as successive nodes are 'crowbarred' apart by this equal spacing. (In my experience this can lead to some clades having unrealistically early origins.) A better solution was provided by Ruta et al. (2006). They argued that, after applying the standard method, whenever a zero duration branch is encountered it should be assigned a positive length by 'sharing' time with a preceding, non-zero duration branch. They further stated that the proportion of sharing should be dictated by the branches' lengths in terms of character changes (i.e. biasing the results towards a null hypothesis of equal rates). (This can still lead to zero duration branches, but only where there are no changes so that the rate would be zero in any case). Brusatte et al. (2008) adopted a similar approach, but shared out the time equally between branches. Here a function for use in the freely available statistical progamming language R is provided. This performs dating of the tree using either the standard, Ruta et al. (2006) or Brusatte et al. (2008) method.


1. Install and run R (it's free!).
2. Install the APE library from within R and load it using:


3. Copy and paste the following line into R and hit enter:


4. Load a treefile (with branch lengths) and store it in the variable "tree". (NB: these can be produced by software such as PAUP* by ensuring the correct option is selected when saving a tree.)

    tree<-read.tree("mytreefile.tre")    (if in Newick format)

    tree<"mytreefile.tre")    (if in NEXUS format - the standard output from PAUP*)

5. Create a text file of ages (first appearance in millions of years) for your taxa ensuring taxon names appear in exactly the same form as the treefile, e.g.:

    Taxon_a    145.0
    Taxon_b    70.0
    Taxon_z    85.0

6. This can then be read into R:


7. If using the Ruta et al. (2006) method you will need to first calibrate your tree using Wagner's (1997) patristic dissimilarity metric. This can be done using the pat.dist.phylo function, but requires an additional vector of missing states for each character. This can be done by creating a text file and reading it in in the same manner as the ages, but this time storing it as "comp".
8. The patristic dissimilarity tree can be created using the original tree and the "comp" vector created above. In addition the total number of characters should be specified with "nchar=", like this:

    ptree<-pat.dist.phylo(tree, comp, nchar=100)

9. Now we can create a tree with branch lengths scaled to time. For the standard method:

    ttree<-date.phylo(tree, ages, rlen=1, method="standard")

For the Ruta et al. (2006) method:

    ttree<-date.phylo(tree, ages, rlen=1, method="ruta", ptree)

For the Brusatte et al. (2008) method:

    ttree<-date.phylo(tree, ages, rlen=1, method="equal")

(NB: the "rlen=" part specifies a root length (in millions of years) that should always be positive. This is redundant in the standard method, but necessary for both the other two as it means there will always be some preceding time to be shared. In practice you may want to vary the length of "rlen" to see how much it affects your results.)

References cited

Brusatte, S. L., M. J. Benton, M. Ruta and G. T. Lloyd, 2008. Superiority, competition, and opportunism in the evolutionary radiation of dinosaurs. Science, 321, 1485-1488.

Cloutier, R., 1991. Patterns, trends, and rates of evolution within the Actinistia. Environmental Biology of Fishes, 32, 23-58.

Derstler, K. L., 1982. Estimating the rate of morphological change in fossil groups. Proceedings of the Third North American Paleontological Convention, 1, 131-136.

Forey, P. L., 1988. Golden jubilee for the coelacanth Latimeria chalumnae. Nature, 336, 727-732.

Ruta, M., P. J. Wagner and M. I. Coates, 2006. Evolutionary patterns in early tetrapods. I. Rapid initial diversification followed by decrease in rates of character change. Proceedings of the Royal Society B-Biological Sciences, 273, 2107-2111.

Wagner, P. J., 1997. Patterns of morphologic diversification among the Rostroconchia. Paleobiology, 23, 115-150.

Last updated 7th November 2008.