Learn R Programming

entropart (version 1.1.3)

ShannonBeta: Shannon beta entropy of a community

Description

Calculates the Shannon beta entropy of a community belonging to a metacommunity.

Usage

ShannonBeta(Ps, Pexp, CheckArguments = TRUE)
bcShannonBeta(Ns, Nexp, Correction = "Best", CheckArguments = TRUE)

Arguments

Ps
The probability vector of species of the community.
Pexp
The probability vector of species of the metacommunity.
Ns
A numeric vector containing species abundances of the community.
Nexp
A numeric vector containing species abundances of the metacommunity.
Correction
A string containing one of the possible corrections: currently, only "ChaoShen", identical to "Best".
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 entropy.

Details

The derivation of Shannon beta entropy can be found in Marcon et al. (2012). Bias correction requires the number of individuals to estimate sample Coverage. Use bcShannonBeta and choose the Correction.

References

Marcon, E., Herault, B., Baraloto, C. and Lang, G. (2012). The Decomposition of Shannon's Entropy and a Confidence Interval for Beta Diversity. Oikos 121(4): 516-522.

See Also

bcShannonBeta

Examples

Run this code
# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest)
  data(Paracou618)
  # Ps is the vector of probabilities
  Ps <- Paracou618.MC$Ps
  # Probability distribution of the first plot
  Ps1 <- Paracou618.MC$Psi[, 1]
  # Shannon beta entropy of the plot
  ShannonBeta(Ps1, Ps)

  # Ns is the vector of abundances of the metacommunity
  Ns <- Paracou618.MC$Ns
  # Abundances in the first plot
  Ns1 <- Paracou618.MC$Nsi[, 1]
  # Unbiased Shannon beta entropy of the plot
  bcShannonBeta(Ns1, Ns)

Run the code above in your browser using DataLab