Notation used in the following formulas: $N$, category count; $p_i$, proportion of entity comprises category $i$; $d_{ij}$, disparity between $i$ and $j$; $q$,$\alpha$ and $\beta$, parameters.The available diversity measures included in the package are listed above. The titles of the formulas are the possible mnemonic values that the parameter "type" might take to compute that formula (i.e. diversity(data, type='variety') or diversity(data, type='v'):
variety, v:
Category counts per entity [MacArthur 1965] $$\sum_i(p_i^0)$$.
entropy, e:
Shannon entropy per entity [Shannon 1948] $$- \sum_i(p_i \log p_i)$$
Herfindahl-Hirschman, hh, hhi: The Herfindahl-Hirschman Index used in economy to measure the concentration of markets. $$\sum_i(p_i^2)$$
gini-simpson, gs:
Gini-Simpson index per object [Gini 1912]. This measure is also known as the Gibbs-Martin index or the Blau index in sociology, psychology and management studies. $$1 - \sum_i(p_i^2)$$
simpson, s:
Simpson index per entity [Simpson 1949]. $$D = \sum_i n_i(n_i-1) / N(N-1)$$
When this measure is required, then also associated variations Simpson's Index of Diversity $1-D$ and the Reciprocal Simpson $1/D$ will be computed.
true-diversity, td:
True diversity index per entity [Hill 1973]. This measure is $q$ parameterized. When $q=1$ the equation is undefined, then, an aproximation is computed. Default for $q$ is 0. $$(\sum_ip_{i}^q)^{1/(1-q)}$$
berger-parker, bp:
Berger-Parker index is equals to the maximum $p_i$ value in the entity, i.e. the proportional abundance of the most abundant type. When this measure is required, the reciprocal measure is also computed.
renyi, re:
Renyi entropy per object. This measure is a generalization of the Shannon entropy parameterized by $q$. It corresponds to the logarithm of the true diversity index. The default value for $q$ is 0. $$(1-q)^{-1} \log(\sum_i p_i^q)$$
evenness, ev:
Pielou evenness per object across categories [Pielou, 1969]. It is based in Shannon Entropy $$-\sum_i(p_i \log p_i)/\log{v}$$
rao:
Rao diversity. $$\sum_{ij}d_{ij} p_i p_j$$
rao-stirling, rs:
Rao-Stirling diversity per object across categories [Stirling, 2007]. Default values are $\alpha=1$ and $\beta=1$.
For the pairwise disparities the measure allows to consider the Jaccard Index, Euclidean distances, Cosine Similarity among others. $$\sum_{ij}{d_{ij}}^\alpha {(p_i p_j )}^\beta$$