Description Usage Arguments Details Value Author(s) References Examples
A statistical test of diversification rate shift within an evolutionary process.
1 | shift.test(tree, node, lambda1, lambda2, nrep, silent)
|
tree |
An object of class |
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 |
lambda2 |
A positive numerical value (object of class |
nrep |
Number of Monte-carlo replicates in the computation of the P-value. |
silent |
A boolean indicating whether the test is silent or verbose. |
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.
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.
Eric Durand eric.durand@imag.fr
Olivier Francois olivier.francois@imag.fr
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.).
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"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.