Skip to contents

Shannon-Wiener Diversity Index

Usage

index_shannon(x, ...)

# S4 method for numeric
index_shannon(
  x,
  evenness = FALSE,
  unbiased = FALSE,
  ACE = FALSE,
  base = exp(1),
  na.rm = FALSE,
  ...
)

Arguments

x

A numeric vector of count data (absolute frequencies).

...

Currently not used.

evenness

A numeric scalar: should evenness be computed?

unbiased

A logical scalar: should the bias-corrected estimator be used?

ACE

A logical scalar: should the ACE species richness estimator be used in the bias correction?

base

A positive numeric value specifying the base with respect to which logarithms are computed.

na.rm

A numeric scalar: should missing values (including NaN) be removed?

Value

A numeric vector.

Details

The Shannon index assumes that individuals are randomly sampled from an infinite population and that all taxa are represented in the sample (it does not reflect the sample size). The main source of error arises from the failure to include all taxa in the sample: this error increases as the proportion of species discovered in the sample declines (Peet 1974, Magurran 1988). The maximum likelihood estimator (MLE) is used for the relative abundance, this is known to be negatively biased by sample size.

References

Peet, R. K. (1974). The Measurement of Species Diversity. Annual Review of Ecology and Systematics, 5(1), 285-307. doi:10.1146/annurev.es.05.110174.001441 .

Magurran, A. E. (1988). Ecological Diversity and its Measurement. Princeton, NJ: Princeton University Press. doi:10.1007/978-94-015-7358-0 .

Shannon, C. E. (1948). A Mathematical Theory of Communication. The Bell System Technical Journal, 27, 379-423. doi:10.1002/j.1538-7305.1948.tb01338.x .

Author

N. Frerebeau