Description Usage Arguments Details Value Author(s) References See Also Examples

Calculate the Gini-Simpson coefficient.

1 | ```
GiniSimpson(x, na.rm = FALSE)
``` |

`x` |
a vector containing at least non-negative elements. |

`na.rm` |
logical. Should missing values be removed? Defaults to FALSE. |

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.

a numeric value.

Andri Signorell <[email protected]>

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

`DivCoef`

, `Entropy`

, `Gini`

, `Herfindahl`

1 2 3 4 5 6 7 8 | ```
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))
``` |

```
[1] 0.8331263
[1] 0.8331263
[1] 0.8698708
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.