Description Usage Arguments Details Value Author(s) References Examples
cladesize
takes a random internal node in a tree, and computes its number of descendants (clade size).
1 | cladesize(tree)
|
tree |
An object of class |
This function can be used to check whether a tree fits the Yule or the PDA models. Under the Yule model, the probability distribution of the random clade size is equal to
P(Kn=k)=2*n/((n-1)*k(k+1))
for k = 2, 3, …, n-1 and
P(Kn=n)=1/(n-1)
(where n is the number of tips of the tree and Kn is the number of descendents of an internal node of the tree). Under the PDA model, the asymptotic distribution (when the number of tips grows to infinity) of the random clade size is equal to
P(K=k+1)=choose(2*k,k)/((k+1)*(2^k)^2)
.
An object of class numeric
representing the clade size of a random node of a tree.
Michael Blum <michael.blum@imag.fr>
Nicolas Bortolussi <nicolas.bortolussi@imag.fr>
Eric Durand <eric.durand@imag.fr>
Oliver Francois <olivier.francois@imag.fr>
Blum, M., Francois, O. and Janson, S. The mean, variance and limiting distribution of two statistics sensitive to phylogenetic tree balance; manuscript available from
http://www-timc.imag.fr/Olivier.Francois/bfj.pdf.
1 2 3 4 5 | # Histogram of random clade sizes
main="Random clade sizes for random generated trees"
xlabel="clade size"
hist(sapply(rtreeshape(100,tip.number=40,model="yule"),FUN=cladesize),
freq=FALSE,main=main,xlab=xlabel)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.