Learn R Programming

poweRbal (version 0.0.1.1)

genDensityTree: Generation of rooted binary trees under the density model

Description

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.

Usage

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

Value

genDensityTree A single tree of class phylo is returned.

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.

References

  • P. H. Harvey, R. M. May, and S. Nee. Phylogenies without fossils. Evolution, 48(3):523–529, 1994.

Examples

Run this code
genDensityTree(n = 5, EQUILIB = 6)

Run the code above in your browser using DataLab