Most popular dissimilarity measures in ecology can be expressed with
the help of terms J
, A
and B
, and some also involve
matrix dimensions N
and P
. Some examples you can define in
designdist
are:
A+B-2*J | "quadratic" | squared Euclidean |
A+B-2*J | "minimum" | Manhattan |
(A+B-2*J)/(A+B) | "minimum" | Bray-Curtis |
(A+B-2*J)/(A+B) | "binary" | Sørensen |
(A+B-2*J)/(A+B-J) | "binary" | Jaccard |
(A+B-2*J)/(A+B-J) | "minimum" | Ružička |
(A+B-2*J)/(A+B-J) | "quadratic" | (dis)similarity ratio |
1-J/sqrt(A*B) | "binary" | Ochiai |
1-J/sqrt(A*B) | "quadratic" | cosine
complement |
1-phyper(J-1, A, P-A, B) | "binary" | Raup-Crick (but see raupcrick ) |
The function designdist
can implement most dissimilarity
indices in vegdist
or elsewhere, and it can also be
used to implement many other indices, amongst them, most of those
described in Legendre & Legendre (2012). It can also be used to
implement all indices of beta diversity described in Koleff et
al. (2003), but there also is a specific function
betadiver
for the purpose.
If you want to implement binary dissimilarities based on the 2x2
contingency table notation, you can set abcd = TRUE
. In this
notation a = J
, b = A-J
, c = B-J
, d = P-A-B+J
.
This notation is often used instead of the more more
tangible default notation for reasons that are opaque to me.
With alphagamma = TRUE
it is possible to use beta diversity
notation with terms alpha
for average alpha diversity and
gamma
for gamma diversity in two compared sites. The terms
are calculated as alpha = (A+B)/2
, gamma = A+B-J
and
delta = abs(A-B)/2
. Terms A
and B
are also
available and give the alpha diversities of the individual compared
sites. The beta diversity terms may make sense only for binary
terms (so that diversities are expressed in numbers of species), but
they are calculated for quadratic and minimum terms as well (with a
warning).
Function chaodist
is similar to designgist
, but uses
terms U
and V
of Chao et al. (2005). These terms are
supposed to take into account the effects of unseen species. Both
U
and V
are scaled to range \(0 \dots 1\). They take
the place of A
and B
and the product U*V
is used
in the place of J
of designdist
. Function
chaodist
can implement any commonly used Chao et al. (2005)
style dissimilarity:
1 - 2*U*V/(U+V) | Sørensen type |
1 - U*V/(U+V-U*V) | Jaccard type |
1 - sqrt(U*V) | Ochiai type |
(pmin(U,V) - U*V)/pmin(U,V) | Simpson type |
Function vegdist
implements Jaccard-type Chao distance,
and its documentation contains more complete discussion on the
calculation of the terms.