rin
provides a wrapper that allows for the easy calculation of multiple plot (site) resemblance measures in neighboorhoods in an automated fashion including testing whether the found resemblance patterns are significantly different from random.mpd(x, method="simpson", all=FALSE)mps(x, method="whittaker", all=FALSE)
mps.ave(x, method="soerensen", all=FALSE, foc=NULL,
what="mean", ...)
mos.f(x, foc, d.inc=FALSE, preso=FALSE, pc = NULL)
mos.ft(x, foc = NULL, method = "soerensen", quant = FALSE, binary = TRUE, ...)
sos(x, method="mean", foc=NULL, normal.sp=TRUE, normal.pl=TRUE)
rin(veg, coord, dn, func, test = TRUE, permutations = 100,
permute = 2, sfno = TRUE, p.level = 0.05, ...)
mps
and mpd
it sets whether the results of all possible methods shall be given in the result, or only the method given in the method
argumemos.f
, mos.ft
, mps.ave
, sos
mps.ave
, which statistic (mean
or sd
) should be given back? See details.veg
but not within the plots that make up a neighborhood be regarded when computing mos.f
. This setting dramatically changes the behaviour of mps.f
because it then becomes amos.f
be computed? Default is FALSE
. See details.mos.f
. With pattern control (pc
!=NULL) the similarity of the focal plot to the pooled surrounding plots is evaluated. Doing that assures that species which only occur TRUE
use a quantitative index for calculating the similarity between the focal and the pooled surrounding plots.TRUE
pool the data for the surrounding the plots by taking the columns sums and correct the abundances on the focal plot by multiplying with the number of surrounding plots (to avoid a bias due to the area effect). If FALSE<
sos
(sum of squares of species matrix, which is a measure of beta-diversity (Legendre et al. 2005)): Shall the result be normalized with respect to the number of species.sos
(sum of squares of species matrix, which is a measure of beta-diversity (Legendre et al. 2005)): Shall the result be normalized with respect to the number of plots.data.frame
with two columns with the first column giving the x (easting) coordinate and the second giving the y (northing) coordinate in UTM or th"mpd(x)"
to compute the Simpson multiple plot dissimilarity coeffTRUE
. See details.rin
, how should the permutation of species to reflect random expectations be done: An integer of either 1, 2, or 3. With 1
the species matrix (veg
) is permuted across rows. With 2
the spermute
= 3. If TRUE
, than the species are only drawn at random from the neighboorhod species sub matrix. If set to FALSE
, the species ampd
, mps
, mps.ave
, mos.f
can be passed via ....mpd
, mps
, mps.ave
, mos.f
, and mos.ft
return a single value with the calculated index (according to the method
argument, or to the other arguments). When all
is set to TRUE
, mps.ave
returns two values (the average and the standard deviation of the pairwise similarities in the neighborhood), whereas mpd
and mps
return a named numerical vector with the values for all indices that can be calculated with the respective function.rin
gives back a table (data.frame
s), that reports several values for each plot in the dataset per row. The first three columns are always returned. In case test = TRUE
, three more columns with information on the significance test are returned.
permute
argument the data set is shuffled. The random data is subjected to the same calculations permutations
times. The original value of multiple plot similarity is compared to the distribution of random values to obtain this p.+
) of lower (-
).rin
takes all of them and provides a framework for applying the measures to an array of plots to calculate multiple plot resemblance in neighborhoods (Jurasinski et al. submitted).mps
stands for multiple plot similarity, whereas mpd
stands for multiple plot dissimilarity and mos
stands for measure of singularity; the letters behind the "." further specifiy the class of measures that can be calculated with the respective function.
mps.ave
calculates average multiple plot (dis-)similarities from pairwise (dis-)similarity calculations between the plots in the dataset or in the specified neighborhood. It has several options. With setting the foc
argument different from NULL, only the pairwise (dis-)similarities between the specified focal plot and all others in the dataset (neighborhood) are taken to calculate the mean
and sd
from. When the specified focal plot is not existing, the function will issue a warning and stop. When run with defaults (foc
= NULL), all pairwise similarities between the plots in the neighborhood (dataset) are considered. Any resemblance measure available via sim
or sim.yo
can be taken as base for calculating the average (dis-)similarity and its spread.
mps
calculates multiple plot (dis-)similarities that are either derived from other approaches to beta-diversity calculation (Whittaker's beta, additive partitioning), or have been around for quite a while (Harrison multiple plot dissimilarity, Harrison multiple plot turnover, Williams multiple plot turnover). None of these considers the actual species composition on each of the compared plots. The following methods are available (n = number of plots, S = number of species, $\gamma = gamma diversity (S_n)$, $\alpha = alpha diversity (S_i)$):
whittaker
: Calculates Whittaker's beta (multiplicative partitioning, Whittaker 1960) $\beta = \gamma/mean(\alpha)$.
inverse.whittaker
: Inverse Whittaker's beta (multiplicative partitioning). Scales between 1/n (when the considered plots do not share any species at all) and 1 (when all plots share the same species)
additive
: Additive partitioning. Following Lande (1996) and keeping it with $\alpha$ = species number, the additive beta-component of the neighborhood (in the rin
-case or the complete dataset in the mps
-case) is calculated.
harrison
: Harrison (1992) multiple plot dissimilarity. A transformation of Whittaker's beta to be bounded between 0 and 1 ($\frac{\beta_W - 1}{n-1}$.
diserud
: Diserud & Ødegaard (2007) derived this from the pairwise Sørensen similarity measure. However, as Baselga highlights, this can also be derived from Whittaker's beta $\frac{n - \beta_W }{n-1}$ and is basically the same as Harrisons multiple plot dissimilarity but expressed as a similarity.
harrison.turnover
: $\frac{\frac{\gamma}{max(\alpha)}-1}{n-1}$ (Harrison et al. 1992).
williams
: $1 - \frac{max(\alpha)}{\gamma}$ (Williams 1996).
mpd
calculates multiple plot dissimilarity indices that have been suggested by Baselga (2010). The following methods are available (The implementation differs slightly from the one offered by Baselga in the electronic appendix of his paper and is computationally more efficient):
simpson
: mps.Sim in the following. Baselga et al. (2007) derive this multiple plot dissimilarity coefficient directly from the pairwise Simpson dissimilarity index by applying it to a group of plots/sites. The authors emphasize, that this coefficient is independent of patterns of richness and peforms better than the Diserud & Ødegaard cofficient in cases of unequal species numbers between plots, because it discriminates between situations in which shared species are distributed evenly among plots or concentrated in a few pairs of sites.
sorensen
: mps.Sor in the following. By building multiple site equivalents of the matching components (a, b, c) Baselga (2010) derives a Sørensen based measure of multiple plot dissimilarity.
nestedness
: mps.nes in the following. Because the Sørensen based multiple plot dissimilarity coefficient accounts for both spatial turnover and nestedness whilst the Simpson based multiple plot dissimilarity coefficient accounts only for spatial turnover, it is possible to calculate the multiple plot similarity that is completely due to nestedness by calculating mps.Sor - mps.Sim.
mos.f
calculates a focal measure of singularity. In contrast to the other functions the different outcomes can be triggered by setting the further arguments accordingly.
The indices of mos.f
change depending on the vegetation composition of the focal plot. The value is therefore true and valid only for the comparison of the focal plot with the surrounding plots. Not the similarity in the neighborhood, but the similarity of the focal plot to all others in the neighborhood is calculated. The calculation is based on the occurrences and non-occurrences of species on the compared plots with the species composition on the focal plot determining which of the two is to be used for which species: For all species that occur on the focal plot the proportional frequencies of occurrence in the neighborhood are summed up. For species that do not occur on the focal plot the proportional frequencies of non-occurrence in the neighborhood are summed up.
$$\sum_{i=1}^{s_o} f_{oi} + \sum_{i=1}^{s_n} f_{ni}$$
with f_oi = proportional frequency of occurrences of the ith species on the compared plots, only carried out for species that do occur on the focal plot, f_nj = frequency of non-occurrences of the jth species on the compared plots, only carried out for species that do not occur on the focal plot). The frequencies are calculated against the total numbers of cells in the species matrix and are therefore 'proportional frequencies' (in analogy to 'proportional abundances' as in diversity indices like Shannon or Simpson). Thus, if all compared plots have an identical species composition, the resulting value of the multi-plot similarity coefficient is 1. In this rather hypothetical case the species presence absence matrix would be filled with ones only. This is the null model against which the 'proportional frequencies' are calculated. Therefore, the coefficient can be interpreted as a measure of deviation from complete uniformity. There are three versions.
preso=TRUE
: In this case a presence only version is calculated (mos.fpo
). Therefore the second term is skipped and the formula simplifies to $\sum_{i=1}^{s_o} f_{oi}$. This very much glorifies the species composition on the focal plot and evaluates whether the surrounding plots in the neighborhood feature the same species.
d.inc=FALSE
: When the d.inc
argument is set to FALSE
, only the species in the neighborhood build the basis against which the 'proportional frequencies' are calculated. This is the default index mos.f
.
When run with defaults (preso = FALSE
) and (d.inc = TRUE
), a symmetric focal measure of siingularity (mos.fs
) results. It is definetely meant for use in the context of rin
. The 'proportional frequencies' are calculated against the whole species matrix. Thus, the index is a symmetric similarity coefficient sensu Legendre & Legendre 1998 that considers species that do not occur on the compared plots but in the whole data set. Therefore, it is more appropriate for biodiversity or conservation studies and not so much for the investigation of ecological relationships. However, it can be interpreted as an 'ordination on the spot': By calculating mos.fs
for a focal plot against its surrounding plots its position along the main gradient according to its species composition is estimated immediately because the species composition in the rest of the data set is incorporated in the construction of the proportional frequencies of the species. Because of this, mos.fs
can be interpreted as a measure of deviation from complete unity in species composition. When the neighborhood is increased to the full data set, mos.f
and mos.fs
converge.
mos.ft
calculates the singularity of a focal plot with respect to the pooled species composition on surrounding plots. Many binary or quantitave similarity indices can be used (all those that are available via sim
and vegdist
).
sos
calculates the sum of squares of a species matrix. Legendre et al. (2005) show, that this is a measure of beta-diversity. However, when you don't normalize against the number of species and/or plots the obtained values can hardly be compared across data sets (or neighborhoods). Therefore, its advisable to run this with defaults (normal.sp = TRUE
and normal.pl = TRUE
). For experiments, method
can be set to "foc"
. Then, not the deviation from the mean of the species occurence across plots builds the basis, but the deviation from the situation on a focal plot. This makes it somewhat related to the mos.f
-stuff.
rin
applies the other functions to an array of plots. For each plot a neighborhood is constructed via the dn
argument and the specified index is calculated for all plots and neighborhoods. The function to be calculated is specified simply by the func
argument. For instance, with func = "mpd(x, method='sorensen')"
the function rin
calculates the Sørensen multiple plot dissimilarity for each plot and its neighborhood in an array. The functions that need the identity of a focal plot (mps.ave
, mos.f
, and mos.ft
) automatically derive the focal plots. However, to trigger this it has to be specified within the func
argument: func = "mos.f(x, foc = foc)"
.
Baselga A (2010) Partitioning the turnover and nestedness components of beta diversity. Global Ecology and Biogeography 19: 134–143.
Diserud OH, Ødegaard F (2007) A multiple–site similarity measure. Biology Letters 3: 20–22.
Harrison S, Ross SJ, Lawton JH (1992) Beta-diversity on geographic gradients in Britain. Journal of Animal Ecology 61: 151–158.
Jurasinski G, Jentsch A, Retzer V, Beierkuhnlein C (2011) Assessing gradients in species composition with multiple plot similarity coefficients. Ecography 34: 1-16.
Lande R (1996) Statistics and partitioning of species diversity, and similarity among multiple communities. Oikos 76: 5–13.
Legendre P, Borcard D, Peres-Neto P (2005) Analyzing beta diversity: partitioning the spatial variation of community composition data. Ecological Monographs 75: 435–450.
Williams PH (1996) Mapping variations in the strength and breadth of biogeographic transition zones using species turnover. Proceedings of the Royal Society of London Series B–Biological Sciences 263: 579–588.
Whittaker RH (1960) Vegetation of the Siskiyou Mountains, Oregon and California. Ecological Monographs 30: 279–338.
sim
, vegdist
, dsvdis
for pairwise similarity measures.# load the data that comes with the package
data(abis)
# calculate a multiple plot similarity index
# (Sørensen sensu Baselga) for whole dataset
mpd(abis.spec, method="sorensen")
# calculate a multiple plot similarity index
# (Sørensen sensu Baselga) for each plot and
# its neighborhood
abis.mpd.so <- rin(abis.spec, coord=abis.env[,1:2],
dn=100, func="mpd(x, method='sorensen')")
# plot the grid of plots and show the calculated
# multiple plot dissimilarity value through the
# size of the symbol and the sign of the value
# with a superimposed "+" or "-"
with(abis.mpd.so , {
plot(abis.env[,1:2], cex=symbol.size(dis), pch=c(21,1)[sig],
bg="grey50", xlab="", ylab="")
subs <- sig == "*"
points(abis.env[subs,1:2], pch=c("-", "+")[sig.prefix[subs]])
})
# calculate a multiple plot similarity index
# that takes care of the species composition
# on the focal plot
rin(abis.spec, coord=abis.env[,1:2], test=FALSE,
dn=100, func="mos.f(x, foc=foc)")
Run the code above in your browser using DataLab