tips.sim: Simulation of terminal node states on a phylogenetic tree.

Description Usage Arguments Details Value See Also

Description

Simulates tip states on a phylogeny according to a continuous-time Markov model of evolution.

Usage

1
2
tips.sim(tree, rate.mat, root.dist, scale = FALSE,
         states = c("a","c","g","t"), N)

Arguments

tree

A tree object of class "phylo" (ape format).

rate.mat

A continuous-time Markov chain (CTMC) rate matrix.

root.dist

A numeric vector defining the root distribution of the evolutionary process on the tree. If this process starts at stationarity (as is commonly assumed), then the root distribution is equal to the CTMC stationary distribution.

scale

A logical indicating whether to scale the time dimension. If TRUE, then time is specified in terms of the expected number of CTMC substitutions per site.

states

A character or integer vector denoting the CTMC state space. Defaults to the set of DNA nucleotides c("a","c","g","t").

N

An integer specifying the number of samples to draw.

Details

More information on phylogenetic tree objects of class "phylo" can be found at http://ape-package.ird.fr/misc/FormatTreeR_24Oct2012.pdf.

Value

A character or integer matrix with dimensions c(length(tree$tip.label), N), where each column contains an independent sample of terminal node states.

See Also

int.states.sim, phylojumps.sim


dunleavy005/phylomoments documentation built on May 15, 2019, 5:59 p.m.