tmDensity function

Generation of rooted binary trees under the density model

Generation of rooted binary trees under the density model

genDensityTree - Generates a rooted binary tree in phylo

format with the given number of n leaves under the density-dependent model. In the density-dependent tree generation process all species have the same speciation BIRTHRATE, but the extinction rates depend on the number of species (it increases linearly with the number of co-existing lineages until an equilibrium number is reached at which speciation and extinction rates are equal). Extinct species are removed from the tree, i.e., the generated tree contains only species living at the present.

genDensityTree(n, BIRTHRATE = 1, EQUILIB, TRIES = 5, TIMEperTRY = 0.01)

Arguments

  • n: Integer value that specifies the desired number of leaves, i.e., vertices with in-degree 1 and out-degree 0.

    Due to the restrictions of the phylo or multiphylo format, the number of leaves must be at least 2 since there must be at least one edge.

  • BIRTHRATE: Positive numeric value (default = 1) which specifies the rate at which the speciation events occur.

  • EQUILIB: Integer value that specifies the equilibrium number.

  • TRIES: Integer value (default = 5) that specifies the number of attempts to generate a tree with n leaves.

  • TIMEperTRY: Numeric value (default = 0.01) that specifies the maximum amount of time (in seconds) invested per try.

Returns

genDensityTree A single tree of class phylo is returned.

Examples

genDensityTree(n = 5, EQUILIB = 6)

References

  • P. H. Harvey, R. M. May, and S. Nee. Phylogenies without fossils. Evolution, 48(3):523–529, 1994.
  • Maintainer: Sophie Kersting
  • License: GPL (>= 3)
  • Last published: 2024-08-16

Useful links