Learn R Programming

entropart (version 1.1.3)

Rao: Rao Quadratic Entropy of a Community

Description

Calculates Rao's quadratic entropy of a community described by a probability vector and a phylogenetic / functional tree.

Usage

Rao(Ps, Tree, CheckArguments = TRUE)

Arguments

Ps
A probability vector, summing to 1.
Tree
An object of class hclust or phylog. The tree must be ultrametric.
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 to the calculated diversity.

Details

Bias correction is not possible when diversity is calculated from probabilities. Use bcPhyloDiversity(Ps, 2, Tree) to do it.

References

Rao, C. R. (1982). Diversity and dissimilarity coefficients: a unified approach. Theoretical Population Biology 21(24-43).

See Also

bcPhyloDiversity

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
  Rao(Ps, Paracou618.Taxonomy)

Run the code above in your browser using DataLab