cladesize {apTreeshape} | R Documentation |
cladesize
takes a random internal node in a tree, and computes its number of descendants (clade size).
cladesize(tree)
tree |
An object of class "treeshape" . |
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 François <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.
# 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)