shift.test: Testing diversification rate variation in phylogenetic trees

Description Usage Arguments Details Value Author(s) References Examples

View source: R/shift.test.R

Description

A statistical test of diversification rate shift within an evolutionary process.

Usage

1
shift.test(tree, node, lambda1, lambda2, nrep, silent)

Arguments

tree

An object of class treeshape.

node

An integer value that represents the internal node at which the test is done. It ranges from 1 to the number of tips minus 2.

lambda1

A positive numerical value (object of class numeric) that represents an ancestral diversification rate in the lineage ending at node.

lambda2

A positive numerical value (object of class numeric) that represents the shifted diversification rate after the speciation event at node.

nrep

Number of Monte-carlo replicates in the computation of the P-value.

silent

A boolean indicating whether the test is silent or verbose.

Details

This function implements a test of diversification rate shift based on the Delta1 statistic (Moore et al. 2004). We introduced some simplifications of the test statistic using basic results in branching process.

Value

The function provides textual results and a P-value for the null hypothesis of no diversification rate shift against a (lambda2/lambda1)-fold shift at the node under consideration.

Author(s)

Eric Durand eric.durand@imag.fr
Olivier Francois olivier.francois@imag.fr

References

Moore, B.R., Chan, K.M.A, and Donoghue M.J. (2004) Detecting diversification rate variation in supertrees. In Bininda-Emonds, O. R. P. (ed.) Phylogenetic Supertrees: Combining Information to Reveal the Tree of Life, pp. 487-533. Computational Biology, volume 3 (Dress, A., series ed.).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
	## Detecting diversification rate variation in bird families (135 tips)
 data(bird.families)
 tree.birds <- as.treeshape(bird.families, model = "yule")
 class(tree.birds) <- "treeshape"
 pv <- sapply(1:135, FUN = function(i) shift.test(tree.birds, i, lambda1 = 1, 
                                      lambda2 = 100, nrep = 1000, silent = TRUE))

	## Significant shifts detected at nodes = 67 and 78	
 pv[c(67,78)]
 shift.test(tree.birds, node = 67, lambda1 = 1, lambda2 = 100, nrep = 10000, silent = TRUE)
 shift.test(tree.birds, node = 78, lambda1 = 1, lambda2 = 100, nrep = 10000, silent = TRUE)

 	## visualize the shifts
 par(mfrow=c(2,1)) 
 plot(cutreeshape(tree.birds, ancestor(tree.birds, 67) , "bottom"))
 plot(cutreeshape(tree.birds, 78 , "bottom"))

apTreeshape documentation built on Jan. 8, 2021, 2:07 a.m.