cladesize            package:apTreeshape            R Documentation

_C_o_m_p_u_t_e _t_h_e _n_u_m_b_e_r _o_f _c_h_i_l_d_r_e_n _o_f _a _r_a_n_d_o_m_l_y _c_h_o_s_e_n _n_o_d_e

_D_e_s_c_r_i_p_t_i_o_n:

     'cladesize' takes a random internal node in a tree, and computes
     its number of descendants (clade size).

_U_s_a_g_e:

     cladesize(tree)

_A_r_g_u_m_e_n_t_s:

    tree: An object of class '"treeshape"'. 

_D_e_t_a_i_l_s:

     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)

     .

_V_a_l_u_e:

     An object of class 'numeric' representing the clade size of a
     random node of a tree.

_A_u_t_h_o_r(_s):

     Michael Blum <michael.blum@imag.fr> 
       Nicolas Bortolussi <nicolas.bortolussi@imag.fr> 
      Eric Durand <eric.durand@imag.fr> 
      Oliver Franois <olivier.francois@imag.fr>

_R_e_f_e_r_e_n_c_e_s:

     Blum, M., Francois, O. and Janson, S. The mean, variance and
     limiting distribution of two statistics sensitive to phylogenetic
     tree balance; manuscript available from 
       <URL: http://www-timc.imag.fr/Olivier.Francois/bfj.pdf>.

_E_x_a_m_p_l_e_s:

     # 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)

