Learn R Programming

entropart (version 1.1.3)

AllenH: Phylogenetic Entropy of a Community

Description

Calculates the phylogenetic diversity of order $q$ of a probability vector.

Usage

AllenH(Ps, q, PhyloTree, Normalize = TRUE, CheckArguments = TRUE)

Arguments

Ps
A probability vector, summing to 1.
q
A number.
PhyloTree
An object of class hclust or phylog. The tree is not necessarily ultrametric. Computation is must faster if the tree is ph
Normalize
If TRUE (default), diversity is not affected by the height of the tree. If FALSE, it is proportional to the height of the tree.
CheckArguments
Logical; if TRUE, the function arguments are verified. Should be set to FALSE to save time when the arguments have been checked elsewhere.

Value

  • A number equal the entropy of the community.

Details

The phylogenetic entropy is calculated following Allen et al. (2009) for order $q=1$ and Leinster and Cobold (2011) for other orders.The result is identical to the total entropy calculated by PhyloEntropy but it is much faster. A single value is returned instead of a PhyloEntropy object, and no bias correction is available. The Normalize argument allows normalizing entropy by the height of the tree, similarly to ChaoPD. This function allows very efficient calculation when the Tree is of class phylog or PPtree (hclust trees must be converted to phylog, a slow process). Diversity can be calculated for non ultrametric trees following Leinster and Cobold (2011) even though the meaning of the result is not so clear.

References

Allen, B., Kon, M. and Bar-Yam, Y. (2009). A New Phylogenetic Diversity Measure Generalizing the Shannon Index and Its Application to Phyllostomid Bats. American Naturalist 174(2): 236-243. Leinster, T. and Cobbold, C. (2011). Measuring diversity: the importance of species similarity. Ecology 93(3): 477-489.

See Also

PhyloEntropy, ChaoPD

Examples

Run this code
# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest
  #      and their taxonomy)
  data(Paracou618)
  # Ps is the vector of probabilities
  Ps <- Paracou618.MC$Ps
  
  # Calculate the phylogenetic Shannon diversity of the plot
  AllenH(Paracou618.MC$Ps, 1, Paracou618.Taxonomy, Normalize=TRUE) -> Allen
  Allen
  
  # Calculate it using PhyloEntropy: more powerful but much slower is the tree has many periods
  PhyloEntropy(Paracou618.MC$Ps, 1, Paracou618.Taxonomy, Normalize=TRUE) -> phyE
  summary(phyE)

Run the code above in your browser using DataLab