Zeta.order.mc.mult {zetadiv}R Documentation

Number of species in common between a specific number of assemblages or sites using Monte Carlo sampling, for multiple combinations and several groups of taxa

Description

Computes the number of species shared by multiple assemblages, for a specific order (number of assemblages or sites), for multiple combinations and several groups of taxa.

Usage

Zeta.order.mc.mult(
  data.spec,
  xy = NULL,
  order = 1,
  sam = 1000,
  sd.correct = TRUE,
  sd.correct.adapt = FALSE,
  rescale = FALSE,
  normalize = FALSE,
  NON = FALSE,
  FPO = NULL,
  DIR = FALSE,
  empty.row = "empty",
  silent = TRUE
)

Arguments

data.spec

A list of site-by-species presence-absence data frames, with sites as rows and species as columns.

xy

Site coordinates. This is only used if NON = TRUE or DIR = TRUE.

order

Specific number of assemblages or sites at which zeta diversity is computed.

sam

Number of samples for which the zeta diversity is computed.

sd.correct

Boolean value (TRUE or FALSE) indicating if the standard deviation must be computed with an unbiased estimator (using the number of site combinations - 1 as the denominator) or not (using the number of site combinations as the denominator).

sd.correct.adapt

Boolean value (TRUE or FALSE) indicating if the standard deviation must be computed with an unbiased estimator (using the number of site combinations - 1 as the denominator) if sam is higher than the number of possible combinations, or not (using the number of site combinations as the denominator) if sam is lower than the number of possible combinations. If sd.correct.adapt == TRUE, it takes precedence over sd.correct.

rescale

Boolean value (TRUE or FALSE) indicating if the zeta values should be divided by \zeta_1, to get a range of values between 0 and 1.

normalize

Indicates if the zeta values for each sample should be divided by the total number of species for this specific sample (normalize = "Jaccard"), by the average number of species per site for this specific sample (normalize = "Sorensen"), or by the minimum number of species in the sites of this specific sample
(normalize = "Simpson"). Default value is FALSE, indicating that no normalization is performed.

NON

Boolean value (TRUE or FALSE) indicating if the number of species in common should only be counted for the nearest neighbours.

FPO

A vector with the coordinates of the fixed point origin from which the zeta diversity will be computed (overrides NON). In that case, \zeta_1 is the number of species in the closest site to the FPO, \zeta_2 is the number of species shared by the 2 closest sites, etc.

DIR

Boolean value (TRUE or FALSE) indicating if zeta diversity must be computed using a directed nearest neighbour scheme in the direction away from the FPO, starting from any site.

empty.row

Determines how to handle empty rows, i.e. sites with no species. Such sites can cause underestimations of zeta diversity, and computation errors for the normalized version of zeta due to divisions by 0. Options are "empty" to let the data untreated, "remove" to remove the empty rows, 0 to set the normalized zeta to 0 when zeta is divided by 0 during normalization (sites share no species, so are completely dissimilar), and 1 to set the normalized zeta to 1 when zeta is divided by 0 during normalization (i.e. sites are perfectly similar).

silent

Boolean value (TRUE or FALSE) indicating if messages must be printed.

Details

Contrary to Zeta.order.mc, the number of species shared by the different combinations of assemblages are not averaged, but returned as is. This is useful to then compare local zeta diversity for different groups of taxa.

As for Zeta.order.mc, if the number of combinations of sites is lower than the value of the parameter sam, all the combinations are used and an exact solution is computed. In that case, using the number of site combinations as the denominator may be appropriate to compute the standard deviation, if all sites were sampled and the zeta values. This can be adjusted with parameters sd.correct and sd.correct.adapt.

Value

Zeta.order.mc.mult returns a list containing the following components:

zeta.order

The number of assemblages or sites for which the zeta diversity was computed.

#' @return

sites

A matrix in which each row contains the indices of a given combination, i.e. of the specific sam assemblages.

zeta.val

A data frame in which each column is the number of species shared by the assemblages.

References

Hui C. & McGeoch M.A. (2014). Zeta diversity as a concept and metric that unifies incidence-based biodiversity patterns. The American Naturalist, 184, 684-694.

See Also

Zeta.decline.mc

Examples


utils::data(Marion.species)
xy.marion <- Marion.species[1:2]

data.spec.marion <- Marion.species[3:33]

##random other communities
data.spec.marion2a <- data.spec.marion
data.spec.marion2a[which(data.spec.marion2a==1,arr.ind=TRUE)] <- 0
for(i in 1:ncol(data.spec.marion2a))
  data.spec.marion2a[sample(nrow(data.spec.marion2a),8),i] <- 1
data.spec.marion2b <- data.spec.marion
data.spec.marion2b[which(data.spec.marion2b==1,arr.ind=TRUE)] <- 0
for(i in 1:ncol(data.spec.marion2b))
data.spec.marion2b[sample(nrow(data.spec.marion2b),8),i] <- 1

dat.spec.tot <- list(data.spec.marion,data.spec.marion2a,data.spec.marion2b)
zeta.tot <- Zeta.order.mc.mult(data.spec=dat.spec.tot,order=3,sam=200)


[Package zetadiv version 1.2.1 Index]