Learn R Programming

phytools (version 0.1-9)

make.simmap: Simulate stochastic character map on a phylogenetic tree

Description

This function fits a continuous-time reversible Markov model for the evolution of x (using ace) and then simulates stochastic character histories using that model and the tip states on the tree.

Usage

make.simmap(tree,x,model="SYM",nsim=1)

Arguments

tree
a phylogenetic tree as an object of class "phylo".
x
a vector containing the tip states for a discretely valued character.
model
a character string containing the model - options as in ace.
nsim
number of simulations.

Value

  • a modified phylogenetic tree of class "phylo" (or a modified "multiPhylo" object, for nsim > 1) with the following additional elements:
  • mapsa list of named vectors containing the times spent in each state on each branch, in the order in which they occur.
  • mapped.edgea matrix containing the total time spent in each state along each edge of the tree.

Details

Samples trees from the conditional posterior distribution - conditioning on the maximum likelihood transition matrix given our model.

References

Paradis, E., J. Claude, and K. Strimmer. 2004. APE: Analyses of phylogenetics and evolution in R language. Bioinformatics, 20, 289--290. Huelsenbeck, J. P., R. Neilsen, and J. P. Bollback. 2003. Stochastic mapping of morphological characters. Systematic Biology, 52, 131-138. Bollback, J. P. 2006. Stochastic character mapping of discrete traits on phylogenies. BMC Bioinformatics, 7, 88.

See Also

brownie.lite, brownieREML, evol.vcv, read.simmap, plotSimmap