subtree.test {apTreeshape} | R Documentation |
subtree.test
tests the likelihood of the Yule or the PDA hypothesis and computes the p-value of the test. The test is based on the number of subtrees of a given size in the tree.
subtree.test(tree, size , alternative = "two.sided")
tree |
An object of class "treeshape" . |
size |
The size of the subtrees to test for. |
alternative |
The alternative hypothesis of the test. It can be "two.sided" (default), "less" or "greater" . |
See references for the mathematical details of the test. It uses a Gaussian approximation to compute the p-value.
A list containing the following arguments :
statistic |
the value of the statistic used in the test |
p.value |
the p-value of the test |
alternative |
the alternative hypothesis used for the test |
Michael Blum <michael.blum@imag.fr>
Nicolas Bortolussi <nicolas.bortolussi@imag.fr>
Eric Durand <eric.durand@imag.fr>
Olivier Francois <olivier.francois@imag.fr>
Blum, M. and François, O. (2005) Minimal clade size and external branch length under the neutral coalescent Advances in Applied Probability (2005), 37.3.
## Generate a random pda tree with 50 tips tr<-rtreeshape(n=1,tip.number=50,model="pda") tr<-tr[[1]] ## Test the yule hypothesis, using subtrees of size 2 (Cherries), ## with the alternative hypothesis "less" subtree.test(tr,size=2,alternative="less")