DescTools (version 0.99.14)

GiniSimpson: Compute Gini-Simpson Coefficient

Description

Calculate the Gini-Simpson coefficient.

Usage

GiniSimpson(x, na.rm = FALSE)

Arguments

x
a vector containing at least non-negative elements.
na.rm
logical. Should missing values be removed? Defaults to FALSE.

Value

  • a numeric value.

Details

The original Simpson index $\lambda$ equals the probability that two entities taken at random from the dataset of interest (with replacement) represent the same type. The Simpson index was introduced in 1949 by Edward H. Simpson to measure the degree of concentration when individuals are classified into types. The same index was rediscovered by Orris C. Herfindahl in 1950. The square root of the index had already been introduced in 1945 by the economist Albert O. Hirschman. As a result, the same measure is usually known as the Simpson index in ecology, and as the Herfindahl index or the Herfindahl-Hirschman index (HHI) in economics. Its transformation 1 - $\lambda$ therefore equals the probability that the two entities represent different types. This measure is also known in ecology as the probability of interspecific encounter (PIE) and the Gini-Simpson index.

References

Cover Thomas M. and Thomas Joy A. (1991) Elements of Information Theory. Wiley.

See Also

DivCoef, Entropy, Gini, Herfindahl

Examples

Run this code
x <- c(261,29,33,15,39,28,95,5,6,28,69,8,105,38,15)

GiniSimpson(x)

# is the same as 
1 - Herfindahl(x)

GiniSimpson(c(783,121,112,70,201,153,425,19,37,126,325,51,442,193,41))

Run the code above in your browser using DataCamp Workspace