Description Usage Arguments Details Value References Examples
View source: R/estimate_node_heights.R
Calculates the expected time to branching point of a species tree for a birth-death simulation given a speciation and extinction rate and a number of leaves, and a branching point.
1 2 3 | estimate_node_heights(lambda, mu, n, k = 1)
node_heights(lambda, mu, n, k = 1)
|
lambda |
speciation rate |
mu |
extinction rate |
n |
number of tips on tree |
k |
branching point (k = 1 is the root and is the default) |
By default this branching point is 1 which corresponds to the root, k = 2 corresponds to the first branching point after the root, k = 3 the second, and so on. For more details see Gernhard 2008.
The expected branching time
Gernhard, T. (2008). The conditioned reconstructed process. Journal of theoretical biology, 253(4), 769-778.
1 2 3 4 5 6 | spec_rate <- 1.0
ext_rate <- 0.5
nt <- 10
node_heights(lambda = spec_rate, mu = ext_rate, n = nt)
node_heights(lambda = spec_rate, mu = ext_rate, n = nt, k = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.