sim.rates {phytools}R Documentation

Brownian simulation with multiple evolutionary rates

Description

This function conducts BM simulation on a tree with multiple rates.

Usage

sim.rates(mtree, sig2, anc=0, nsim=1, internal=F, plot=F)

Arguments

mtree

is a stochastic map format phylogenetic tree in modified "phylo" format (e.g., see make.simmap).

sig2

a named vector containing the rates for each state; names should be states in mtree.

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 FALSE.

Value

A vector (for nsim=1) or matrix containing the tip states for the n species in the tree.

Author(s)

Liam Revell liam.revell@umb.edu

References

Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.

See Also

fastBM, make.simmap, read.simmap, sim.history


[Package phytools version 0.4-60 Index]