sim.rates | R Documentation |
Simulates multi-rate or multi-regime continuous trait evolution on a phylogeny.
sim.rates(tree, sig2, anc=0, nsim=1, internal=FALSE, plot=FALSE)
multiOU(tree, alpha, sig2, theta=NULL, a0=NULL, nsim=1, internal=FALSE, ...)
tree |
is a stochastic map format phylogenetic tree in modified |
sig2 |
a named vector containing the rates for each state; names should be states in |
anc |
optional value for the root state. |
nsim |
number of simulations. |
internal |
logical value indicating whether to return states at internal nodes. |
plot |
logical value indicating whether or not to visual the rate heterogeneity (default value is |
alpha |
single value or vector of values of the OU |
theta |
single value or vector of values of the OU |
a0 |
optional value of the root state. Defaults to zero. |
... |
optional arguments. |
The function sim.rates
conducts BM simulation on a tree with multiple rates.
The function multiOU
conducts multi-regime OU simulations on the tree under a range of conditions. multiOU
uses a difference equation approximation of the OU process.
A vector (for nsim=1
) or matrix containing the tip states for the n
species in the tree.
Liam Revell liam.revell@umb.edu
Revell, L. J. (2024) phytools 2.0: an updated R ecosystem for phylogenetic comparative methods (and other things). PeerJ, 12, e16505.
fastBM
, make.simmap
, read.simmap
, sim.history
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.