dissimilarity {bioregion}  R Documentation 
This function creates a data.frame
where each row provides one or
several dissimilarity metric(s) between each pair of sites from a
cooccurrence matrix
with sites as rows and species as columns.
dissimilarity(comat, metric = "Simpson", formula = NULL, method = "prodmat")
comat 
a cooccurrence 
metric 
a vector of string(s) indicating which metrics to chose
(see Details). Available options are abc, ABC, Jaccard,
Jaccardturn, Sorensen, Simpson, Bray,
Brayturn or Euclidean. 
formula 
a vector of string(s) with your own formula based on the

method 
a string indicating what method should be used to compute

With a
the number of species shared by a pair of sites, b
species only
present in the first site and c
species only present in the second site.
\(Jaccard = (b + c) / (a + b + c)\)
\(Jaccardturn = 2min(b, c) / (a + 2min(b, c))\)(Baselga 2012)
\(Sorensen = (b + c) / (2a + b + c)\)
\(Simpson = min(b, c) / (a + min(b, c))\)
If abundances data are available, BrayCurtis and its turnover component can also be computed with the following equation:
\(Bray = (B + C) / (2A + B + C)\)
\(Brayturn = min(B, C)/(A + min(B, C))\) (Baselga 2013)
with A the sum of the lesser values for common species shared by a pair of sites. B and C are the total number of specimens counted at both sites minus A.
formula
can be used to compute customized metrics with the terms
a
, b
, c
, A
, B
, and C
.
For example
formula = c("(b + c) / (a + b + c)", "(B + C) / (2*A + B + C)")
will
compute the Jaccard and BrayCurtis dissimilarity metrics, respectively.
Euclidean computes the Euclidean distance between each pair of sites.
A data.frame
with additional class bioregion.pairwise.metric
,
providing one or several dissimilarity
metric(s) between each pair of sites. The two first columns represent each
pair of sites.
One column per dissimilarity metric provided in metric
and
formula
except for the metric abc and ABC that
are stored in three columns (one for each letter).
Pierre Denelle (pierre.denelle@gmail.com), Maxime Lenormand (maxime.lenormand@inrae.fr) and Boris Leroy (leroy.boris@gmail.com)
Baselga A (2012). “The Relationship between Species Replacement, Dissimilarity Derived from Nestedness, and Nestedness.” Global Ecology and Biogeography, 21(12), 1223–1232.
Baselga A (2013). “Separating the two components of abundancebased dissimilarity: balanced changes in abundance vs. abundance gradients.” Methods in Ecology and Evolution, 4(6), 552–557.
similarity()
dissimilarity_to_similarity similarity_to_dissimilarity
comat < matrix(sample(0:1000, size = 50, replace = TRUE,
prob = 1 / 1:1001), 5, 10)
rownames(comat) < paste0("Site", 1:5)
colnames(comat) < paste0("Species", 1:10)
dissim < dissimilarity(comat,
metric = c("abc", "ABC", "Simpson", "Brayturn"))
simil < dissimilarity(comat, metric = "all",
formula = "1  (b + c) / (a + b + c)")