Learn R Programming

apTreeshape (version 1.2.1)

subtree.test: Test the Yule or PDA hypothesis

Description

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.

Usage

subtree.test(tree, size , alternative = "two.sided")

Arguments

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".

Value

  • A list containing the following arguments :
  • statisticthe value of the statistic used in the test
  • p.valuethe p-value of the test
  • alternativethe alternative hypothesis used for the test

Details

See references for the mathematical details of the test. It uses a Gaussian approximation to compute the p-value.

References

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.

See Also

sackin.test colless.test

Examples

Run this code
## 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")

Run the code above in your browser using DataLab