Learn R Programming

entropart (version 1.4-8)

Simpson: Simpson entropy of a community

Description

Calculates the Simpson entropy of a probability vector.

Usage

Simpson(NorP, Correction="Lande", CheckArguments = TRUE, 
  Ps = NULL, Ns = NULL)
bcSimpson(Ns, Correction = "Lande", CheckArguments = TRUE)
# S3 method for ProbaVector
Simpson(NorP, Correction="Lande", CheckArguments = TRUE, 
  Ps = NULL, Ns = NULL)
# S3 method for AbdVector
Simpson(NorP, Correction="Lande", CheckArguments = TRUE, 
  Ps = NULL, Ns = NULL)
# S3 method for integer
Simpson(NorP, Correction="Lande", CheckArguments = TRUE, 
  Ps = NULL, Ns = NULL)
# S3 method for numeric
Simpson(NorP, Correction="Lande", CheckArguments = TRUE, 
  Ps = NULL, Ns = NULL)

Arguments

Ps

A probability vector, summing to 1.

Ns

A numeric vector containing species abundances.

NorP

A numeric vector, an integer vector, an abundance vector (AbdVector) or a probability vector (ProbaVector). Contains either abundances or probabilities.

Correction

A string containing one of the possible corrections accepted by bcTsallis or "Lande", the default value (equivalent 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 named number equal to the calculated entropy. The name is that of the bias correction used.

Details

Lande's correction has been derived (Lande, 1996; Good, 1953) especially for Simpson entropy, while other corrections are for generalized Tsallis entropy. It is identical to the unbiased estimator proposed by Simpson, although arguments were different. It equals the plug-in etimator multiplied by n/(n-1) where n is the total number of individuals.

Bias correction requires the number of individuals to estimate sample Coverage. Use bcSimpson and choose the Correction.

The functions are designed to be used as simply as possible. Simpson is a generic method. If its first argument is an abundance vector, an integer vector or a numeric vector which does not sum to 1, the bias corrected function bcSimpson is called. Explicit calls to bcSimpson (with bias correction) or to Simpson.ProbaVector (without correction) are possible to avoid ambiguity. The .integer and .numeric methods accept Ps or Ns arguments instead of NorP for backward compatibility.

References

Good, I. J. (1953). On the Population Frequency of Species and the Estimation of Population Parameters. Biometrika 40(3/4): 237-264.

Lande, R. (1996). Statistics and partitioning of species diversity, and similarity among multiple communities. Oikos 76: 5-13.

Simpson, E. H. (1949). Measurement of diversity. Nature 163(4148): 688.

See Also

Tsallis, bcSimpson

Examples

Run this code
# NOT RUN {
  # Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest)
  data(Paracou618)
  # Ns is the total number of trees per species
  Ns <- as.AbdVector(Paracou618.MC$Ns)
  # Whittaker plot
  plot(Ns)

  # Calculate an unbiased estimator of Simpson's index of diversity
  Simpson(Ns)
# }

Run the code above in your browser using DataLab