Skip to contents
  • heterogeneity() returns an heterogeneity or dominance index.

  • evenness() returns an evenness measure.

Usage

heterogeneity(object, ...)

evenness(object, ...)

index_berger(x, ...)

index_boone(x, ...)

index_brillouin(x, ...)

index_mcintosh(x, ...)

index_shannon(x, ...)

index_simpson(x, ...)

# S4 method for matrix
heterogeneity(
  object,
  method = c("berger", "boone", "brillouin", "mcintosh", "shannon", "simpson"),
  j = NULL
)

# S4 method for data.frame
heterogeneity(
  object,
  method = c("berger", "boone", "brillouin", "mcintosh", "shannon", "simpson"),
  j = NULL
)

# S4 method for matrix
evenness(object, method = c("shannon", "brillouin", "mcintosh", "simpson"))

# S4 method for data.frame
evenness(object, method = c("shannon", "brillouin", "mcintosh", "simpson"))

# S4 method for numeric
index_berger(x, na.rm = FALSE, ...)

# S4 method for matrix
index_boone(x, j = NULL, na.rm = FALSE, ...)

# S4 method for numeric
index_brillouin(x, evenness = FALSE, na.rm = FALSE, ...)

# S4 method for numeric
index_mcintosh(x, evenness = FALSE, na.rm = FALSE, ...)

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

# S4 method for numeric
index_simpson(x, evenness = FALSE, na.rm = FALSE, ...)

Arguments

object

A \(m \times p\) numeric matrix or data.frame of count data (absolute frequencies giving the number of individuals for each class).

...

Currently not used.

x

A numeric vector of count data (absolute frequencies).

method

A character string specifying the index to be computed (see details). Any unambiguous substring can be given.

j

An integer giving the index of the reference type/taxa. If NULL (the default), the most frequent type/taxa in any assemblage will be used.

na.rm

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

evenness

A logical scalar: should an evenness measure be computed instead of an heterogeneity/dominance index?

base

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

Value

Details

Diversity measurement assumes that all individuals in a specific taxa are equivalent and that all types are equally different from each other (Peet 1974). A measure of diversity can be achieved by using indices built on the relative abundance of taxa. These indices (sometimes referred to as non-parametric indices) benefit from not making assumptions about the underlying distribution of taxa abundance: they only take relative abundances of the species that are present and species richness into account. Peet (1974) refers to them as indices of heterogeneity.

Diversity indices focus on one aspect of the taxa abundance and emphasize either richness (weighting towards uncommon taxa) or dominance (weighting towards abundant taxa; Magurran 1988).

Evenness is a measure of how evenly individuals are distributed across the sample.

Note

Ramanujan approximation is used for \(x!\) computation if \(x > 170\).

Heterogeneity and Evenness Measures

The following heterogeneity index and corresponding evenness measures are available (see Magurran 1988 for details):

berger

Berger-Parker dominance index. The Berger-Parker index expresses the proportional importance of the most abundant type. This metric is highly biased by sample size and richness, moreover it does not make use of all the information available from sample.

boone

Boone heterogeneity measure.

brillouin

Brillouin diversity index. The Brillouin index describes a known collection: it does not assume random sampling in an infinite population. Pielou (1975) and Laxton (1978) argues for the use of the Brillouin index in all circumstances, especially in preference to the Shannon index.

mcintosh

McIntosh dominance index. The McIntosh index expresses the heterogeneity of a sample in geometric terms. It describes the sample as a point of a \(S\)-dimensional hypervolume and uses the Euclidean distance of this point from the origin.

shannon

Shannon-Wiener diversity index. 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.

simpson

Simpson dominance index for finite sample. The Simpson index expresses the probability that two individuals randomly picked from a finite sample belong to two different types. It can be interpreted as the weighted mean of the proportional abundances. This metric is a true probability value, it ranges from \(0\) (perfectly uneven) to \(1\) (perfectly even).

The berger, mcintosh and simpson methods return a dominance index, not the reciprocal or inverse form usually adopted, so that an increase in the value of the index accompanies a decrease in diversity.

References

Berger, W. H. & Parker, F. L. (1970). Diversity of Planktonic Foraminifera in Deep-Sea Sediments. Science, 168(3937), 1345-1347. doi:10.1126/science.168.3937.1345 .

Boone, J. L. (1987). Defining and Measuring Midden Catchment. American Antiquity, 52(2), 336-45. doi:10.2307/281785 .

Brillouin, L. (1956). Science and information theory. New York: Academic Press.

Kintigh, K. W. (1989). Sample Size, Significance, and Measures of Diversity. In Leonard, R. D. and Jones, G. T., Quantifying Diversity in Archaeology. New Directions in Archaeology. Cambridge: Cambridge University Press, p. 25-36.

Laxton, R. R. (1978). The measure of diversity. Journal of Theoretical Biology, 70(1), 51-67. doi:10.1016/0022-5193(78)90302-8 .

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

McIntosh, R. P. (1967). An Index of Diversity and the Relation of Certain Concepts to Diversity. Ecology, 48(3), 392-404. doi:10.2307/1932674 .

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 .

Pielou, E. C. (1975). Ecological Diversity. New York: Wiley. doi:10.4319/lo.1977.22.1.0174b

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 .

Simpson, E. H. (1949). Measurement of Diversity. Nature, 163(4148), 688-688. doi:10.1038/163688a0 .

See also

Other diversity measures: occurrence(), plot_diversity, rarefaction(), richness(), similarity(), simulate(), turnover()

Author

N. Frerebeau

Examples

data("cantabria")

## Shannon diversity index
(h <- heterogeneity(cantabria, method = "shannon"))
#> [1] 3.269200 2.955298 2.491683 2.485604 2.329187
(e <- evenness(cantabria, method = "shannon"))
#> [1] 0.8987278 0.8966760 0.8462335 0.9178574 0.9373336

## Bootstrap resampling (summary statistics)
bootstrap(h, f = NULL)
#>                  original     mean         bias     error
#> Altamira         3.269200 3.277674  0.008474250 0.0796847
#> Cueto de la Mina 2.955298 2.974878  0.019580574 0.1520335
#> El Juyo          2.491683 2.523781  0.032098006 0.2047191
#> El Cierro        2.485604 2.495330  0.009726472 0.2236202
#> La Paloma        2.329187 2.322662 -0.006524857 0.2666190

bootstrap(h, f = summary)
#>                      Min.  1st Qu.   Median     Mean  3rd Qu.     Max.
#> Altamira         2.995051 3.219776 3.278161 3.275577 3.333885 3.551245
#> Cueto de la Mina 2.496837 2.887573 2.978899 2.973671 3.073825 3.338761
#> El Juyo          1.555410 2.405199 2.537128 2.523658 2.657802 3.086459
#> El Cierro        1.626021 2.342940 2.482822 2.483872 2.636191 3.085291
#> La Paloma        1.242453 2.158182 2.345384 2.314877 2.500231 2.965279

quant <- function(x) quantile(x, probs = c(0.25, 0.50))
bootstrap(h, f = quant)
#>                       25%      50%
#> Altamira         3.232271 3.281301
#> Cueto de la Mina 2.877957 2.978275
#> El Juyo          2.409915 2.534575
#> El Cierro        2.372194 2.521700
#> La Paloma        2.163956 2.348954

## Jackknife resampling
jackknife(h)
#>                  original     mean       bias      error
#> Altamira         3.269200 3.246457 -0.9779158 0.08145529
#> Cueto de la Mina 2.955298 2.932856 -0.9649994 0.15907033
#> El Juyo          2.491683 2.469588 -0.9500688 0.19670002
#> El Cierro        2.485604 2.462723 -0.9838709 0.22195573
#> La Paloma        2.329187 2.305876 -1.0023704 0.25266291