Learn R Programming

iteRates (version 3.1)

tree.rand.test: tree.rand.test

Description

This function performs a randomization test for rate variation among clades.

Usage

tree.rand.test(tree, reps=1000, mod.id=c(1,0,0,0), trace=TRUE)

Arguments

tree
An ultrametric tree of object class phylo.
reps
Desired number of randomizations
mod.id
Indicator vector specifying statistical distributions to be fit to the data. In order, the distributions are exponential, Weibull, lognormal, and variable rates Venditti et al. 2010. Default is exponential only.
trace
If true, progress will be indicated by printing to the screen.

Value

  • A list that consists of the following:
  • treeThe original tree as object class phylo.
  • obs.pObserved set of p-values from comp.subs.
  • ncsA (potentially large) list of output (p-values and evidence ratios) from each randomization.
  • obs.detectionDetection rate for the observed tree. This is the fraction of qualified subtrees with rate variation according to a p-value less than 0.05
  • p.detectionThe fraction of null trees that have more detections than the observed.

Details

This function addresses the potential for spurious inference of diversification rate variation when a phylogeny deviates from the pure birth model. Deviation from pure birth (e.g., when extinction is important or speciation probabilities change over time) distorts the distribution of branching times such that internode lengths do not satisfy the independent and identical distribution (iid) assumption of the PRC test. This function distinguishes among-clade rate variation from rate variation through time by holding the set of branching times constant and randomizing tree topologies. That is, it simulates the null hypothesis that speciation and extinction probabilities are constant across lineages at any given time. The function provides a null distribution for the false detection rate - the fraction of subtrees appearing to have deviant diversification rates when there is no true among-clade rate variation.

References

Shah, P., B. M. Fitzpatrick, and J. A. Fordyce. 2013. A parametric method for assessing diversification rate variation in phylogenetic trees. Evolution 67:368-377.

Examples

Run this code
data(geospiza)
tree <- geospiza$geospiza.tree
tree.rand.test(tree,reps=50) # few reps used to illustrate without taking too much time

Run the code above in your browser using DataLab