Calculate Simpson's diversity, Gini-Simpson index, ENS, and evenness
Source:R/alpha.R
get_alpha_simpson.RdComputes four related measures from Simpson's D (sum of squared relative
abundances). Note that GINI_SIMPSON (1 - D) is a diversity index, not an
evenness measure — it is the probability that two randomly drawn
individuals belong to different species. True evenness is derived from the
number of species (SIMPSON_ENS).
Value
A tibble with one row per sample and columns:
- SIMPSON_D
Simpson's dominance index (sum of squared proportions); lower = more diverse
- GINI_SIMPSON
Gini-Simpson index (1 - D); a diversity index, not evenness
- SIMPSON_ENS
Effective number of species (1 / D); the q=2 Hill number; interpretable as the number of equally abundant dominant species that would yield the same D
- SIMPSON_ENS_EVENNESS
ENS-based evenness (SIMPSON_ENS / S.obs); ranges from 1/S.obs (single dominant) to 1 (all species equal)
Breaking changes
- SIMPSON_EVENNESS
Previously
1 - SIMPSON_D(Gini-Simpson index). Renamed toGINI_SIMPSON. The nameSIMPSON_EVENNESSis no longer returned — old workflows using it will error rather than silently return wrong values.- SIMPSON_INVERSE
Renamed to
SIMPSON_ENS. Old workflows usingSIMPSON_INVERSEwill error.