jaccard {abdiv} | R Documentation |
Beta diversity for presence/absence data
Description
These functions transform the input vectors to binary or presence/absence format, then compute a distance or dissimilarity.
Usage
jaccard(x, y)
sorenson(x, y)
kulczynski_first(x, y)
kulczynski_second(x, y)
rogers_tanimoto(x, y)
russel_rao(x, y)
sokal_michener(x, y)
sokal_sneath(x, y)
yule_dissimilarity(x, y)
Arguments
x , y |
Numeric vectors |
Details
Many of these indices are covered in Koleff et al. (2003), so we adopt their
notation. For two vectors x
and y
, we define three quantities:
-
is the number of species that are present in both
x
andy
, -
is the number of species that are present in
y
but notx
, -
is the number of species that are present in
x
but noty
, and -
is the number of species absent in both vectors.
The quantity is seldom used in ecology, for good reason. For
details, please see the discussion on the "double zero problem," in section
2 of chapter 7.2 in Legendre & Legendre.
The Jaccard index of dissimilarity is , or
one minus the proportion of shared species, counting over both samples
together. Relation of
jaccard()
to other definitions:
Equivalent to R's built-in
dist()
function withmethod = "binary"
.Equivalent to
vegdist()
withmethod = "jaccard"
andbinary = TRUE
.Equivalent to the
jaccard()
function inscipy.spatial.distance
, except that we always convert vectors to presence/absence.Equivalent to
in Legendre & Legendre.
Equivalent to
, as well as
, and
in Koleff (2003).
The Sørenson or Dice index of dissimilarity is
, or one minus the average proportion of shared
species, counting over each sample individually. Relation of
sorenson()
to other definitions:
Equivalent to the
dice()
function inscipy.spatial.distance
, except that we always convert vectors to presence/absence.Equivalent to the
sorclass
calculator in Mothur, and to1 - whittaker
.Equivalent to
in Legendre & Legendre.
Equivalent to
in Koleff (2003). Also equivalent to Whittaker's beta diversity (the second definition,
), as well as
,
,
, and
.
I have not been able to track down the original reference for the first and
second Kulczynski indices, but we have good formulas from Legendre &
Legendre. The first Kulczynski index is , or
one minus the ratio of shared to unshared species.
Relation of kulczynski_first
to other definitions:
Equivalent to
in Legendre & Legendre.
Equivalent to the
kulczynski
calculator in Mothur.
Some people refer to the second Kulczynski index as the Kulczynski-Cody index. It is defined as one minus the average proportion of shared species in each vector,
Relation of kulczynski_second
to other definitions:
Equivalent to
in Legendre & Legendre.
Equivalent to the
kulczynskicody
calculator in Mothur.Equivalent to one minus the Kulczynski similarity in Hayek (1994).
Equivalent to
vegdist()
withmethod = "kulczynski"
andbinary = TRUE
.
The Rogers-Tanimoto distance is defined as
. Relation of
rogers_tanimoto()
to other definitions:
Equivalent to the
rogerstanimoto()
function inscipy.spatial.distance
, except that we always convert vectors to presence/absence.Equivalent to
in Legendre & Legendre.
The Russel-Rao distance is defined
, or the fraction of elements not present
in both vectors, counting double absences. Relation of
russel_rao()
to
other definitions:
Equivalent to the
russelrao()
function inscipy.spatial.distance
, except that we always convert vectors to presence/absence.Equivalent to
in Legendre & Legendre.
The Sokal-Michener distance is defined as
. Relation of
sokal_michener()
to
other definitions:
Equivalent to the
sokalmichener()
function inscipy.spatial.distance
, except that we always convert vectors to presence/absence.
The Sokal-Sneath distance is defined as
. Relation of
sokal_sneath()
to other
definitions:
Equivalent to the
sokalsneath()
function inscipy.spatial.distance
, except that we always convert vectors to presence/absence.Equivalent to the
anderberg
calculator in Mothur.Equivalent to
in Legendre & Legendre.
The Yule dissimilarity is defined as . Relation
of
yule_dissimilarity()
to other definitions:
Equivalent to the
yule()
function inscipy.spatial.distance
, except that we always convert vectors to presence/absence.Equivalent to
, where
is the Yule coefficient in Legendre & Legendre.
Value
The dissimilarity between x
and y
, based on
presence/absence. The Jaccard, Sorenson, Sokal-Sneath, Yule, and both
Kulczynski dissimilarities are not defined if both x
and y
have no nonzero elements. In addition, the second Kulczynski index and the
Yule index of dissimilarity are not defined if one of the vectors has no
nonzero elements. We return NaN
for undefined values.