estShannonf              package:MCPAN              R Documentation

_E_s_t_i_m_a_t_e _t_h_e _S_h_a_n_n_o_n-_W_i_e_n_e_r _i_n_d_e_x

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

     Calculate estimates of the Shannon-Wiener index after pooling over
     several samples, grouped by a factor variable.

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

     estShannonf(X, f)

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

       X: a data.frame of dimension n times p with integer entries,
          where n is the number of samples and p is the number of
          species

       f: a factor variable of length n, grouping the observations in
          'X' 

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

     The function splits 'X' according to the levels of the grouping
     variable 'f', builds the sum over each column and calculates the
     Shannon index ove the resulting counts.

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

     A list, containing the elements: 

estimae : a named numeric vector, the groupwise Shannon indices with
          bias correction according to Fritsch and Hsu (1999)

 estraw : a named numeric vector, the groupwise Shannon indices,
          without bias correction

 varest : a named numeric vector, the groupwise variance estimates of
          the Shannon indices

  table : a matrix, giving the summarized counts of the groups in the
          rows

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

     Fritsch, KS, and Hsu, JC (1999): Multiple Comparison of Entropies
     with Application to Dinosaur Biodiversity. Biometrics 55,
     1300-1305.

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

     data(HCD)
     HCD

     # Groupwise point estimates:

     est<-estShannonf(X=HCD[,-1], f=HCD[,1])

     est

