Calculate the Gini-Simpson coefficient, the Gini variant proposed by Deltas and the Hunter-Gaston Index.
GiniSimpson(x, na.rm = FALSE)
GiniDeltas(x, na.rm = FALSE)HunterGaston(x, na.rm = FALSE)
a numeric value.
a factor containing at least non-negative elements.
logical. Should missing values be removed? Defaults to FALSE
.
Andri Signorell <andri@signorell.net>
The original Simpson index
Its transformation 1 -
Cover Thomas M. and Thomas Joy A. (1991) Elements of Information Theory. Wiley.
Hunter, P., Gaston, A. G. (1988) Numerical Index of the Discriminatory Ability of Typing Systems: an Application of Simpson's Index of Diversity, JOURNAL OF CLINICAL MICROBIOLOGY, Nov. 1988, p. 2465-2466, 0095-1137/88/112465-02$02.00/0
Deltas (2003) DOI:10.1162/rest.2003.85.1.226.
DivCoef
, Entropy
, Gini
, Herfindahl
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 DataLab