Description Usage Arguments Details Value Author(s) References See Also Examples
These two functions simulate phylogenies under any time-dependent
birth–death model. lineage generates a complete tree including
the species that go extinct; rbdtree generates a tree with only
the species until present; drop.fossil is a utility function to
remove the extinct species.
1 2 3 4 5 |
birth, death |
a numeric value or a (vectorized) function specifying how speciation and extinction through time. |
Tmax |
a numeric value giving the length of the simulation. |
BIRTH, DEATH |
a (vectorized) function which is the primitive
of |
eps |
a numeric value giving the time resolution of the simulation; this may be increased (e.g., 0.001) to shorten computation times. |
phy |
an object of class |
tol |
a numeric value giving the tolerance to consider a species as extinct. |
Both functions use continuous-time algorithms described in the
references. The models are time-dependent birth–death models as
described in Kendall (1948). Speciation (birth) and extinction (death)
rates may be constant or vary through time according to an R function
specified by the user. In the latter case, BIRTH and/or
DEATH may be used of the primitives of birth and
death are known. In these functions time is the formal argument
and must be named t.
An object of class "phylo".
Emmanuel Paradis
Kendall, D. G. (1948) On the generalized “birth-and-death” process. Annals of Mathematical Statistics, 19, 1–15.
Paradis, E. (2010) Time-dependent speciation and extinction from phylogenies: a least squares approach. Evolution (in press)
yule, yule.time, birthdeath,
rtree, stree
1 2 3 4 5 6 7 8 9 10 11 12 13 | plot(rlineage(0.1, 0)) # Yule process with lambda = 0.1
plot(rlineage(0.1, 0.05)) # simple birth-death process
b <- function(t) 1/(1 + exp(0.2*t - 1)) # logistic
layout(matrix(0:3, 2, byrow = TRUE))
curve(b, 0, 50, xlab = "Time", ylab = "")
mu <- 0.07
segments(0, mu, 50, mu, lty = 2)
legend("topright", c(expression(lambda), expression(mu)),
lty = 1:2, bty = "n")
plot(rlineage(b, mu), show.tip.label = FALSE)
title("Simulated with 'rlineage'")
plot(rbdtree(b, mu), show.tip.label = FALSE)
title("Simulated with 'rbdtree'")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.