View source: R/SIM_generation.R
sim.evorates | R Documentation |
This function simulates branchwise rates and corresponding trait data on a given phylogeny under an
"evorates"-style model potentially including rate variance ("R_sig2
"), a trend ("R_mu
"),
and/or tip error ("Y_sig2
"). Capable of simulating multivariate trait evolution, but this
feature is not well-tested.
sim.evorates(
tree,
R0 = 0,
Rsig2 = 1,
X0 = 0,
Rmu = 0,
Xsig2 = 1,
trait.names = NULL,
n.obs = rep(1, length(tree$tip.label)),
Ysig2 = 0,
percent = FALSE,
anc.states = FALSE,
slow = FALSE,
res = 500
)
tree |
An object of class " |
R0 |
The natural log of the starting rate at the root of the phylogeny. |
Rsig2 |
The rate variance parameter, which controls the magnitude of random changes in rates over time. |
X0 |
The starting trait value(s) at the root of the phylogeny. Recycled if
|
Rmu |
The trend parameter, which controls whether rates tend to decrease or increase over time. |
Xsig2 |
The "base" rate of trait evolution, which scales both |
trait.names |
Name(s) of simulated trait(s). If a name is not provided
and/or |
n.obs |
A vector of the number of observations per tip. Assumed to be
in the same order as |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.