gini() is a measure of diversity that goes by a
number of different names, such as the probability of interspecific encounter
or the Gibbs-Martin index. It is \(1 - sum(p_i^2)\), where \(p_i\) is the
probability of observing class i.
The corrected Gini-Simpson index, ginicorr takes the
index and corrects it so that the maximum possible is 1. If there are
k categories, the maximum possible of the uncorrected index is
\(1-1/k\). It corrects the index by dividing by the maximum.
k must be specified.
The modified Gini-Simpson index is similar to the unmodified,
except it uses the square root of the summed squared
probabilities, that is, \(1 - \sqrt{ sum(p_i^2)}\), where \(p_i\) is the
probability of observing class i.
The modified corrected Gini index then
corrects the modified index for the number of categories, k.