Learn R Programming

apTreeshape (version 1.5-0.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 :

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

Details

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

References

Blum, Michael GB, and Olivier Francois. Minimal clade size and external branch length under the neutral coalescent. Advances in Applied Probability 37.3 (2005): 647-662.

See Also

sackin.test colless.test

Examples

Run this code
# NOT RUN {
## 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