calc_comm_div: Calculate biodiversity statistics from sites by species...

View source: R/mobr_boxplots.R

calc_comm_divR Documentation

Calculate biodiversity statistics from sites by species table.

Description

Calculate biodiversity statistics from sites by species table.

Usage

calc_comm_div(
  abund_mat,
  index,
  effort = NA,
  extrapolate = TRUE,
  return_NA = FALSE,
  rare_thres = 0.05,
  scales = c("alpha", "gamma", "beta"),
  avg_alpha = FALSE,
  PIE_replace = FALSE,
  C_target_gamma = NA,
  ...
)

Arguments

abund_mat

Abundance based site-by-species table. Species as columns

index

The calculated biodiversity indices. The options are

  • N ... Number of individuals (total abundance)

  • S ... Number of species

  • S_n ... Rarefied or extrapolated number of species for n individuals

  • S_C ... Estimate species richness of a given level of coverage by C_target_gamma

  • S_asymp ... Estimated asymptotic species richness

  • f_0 ... Estimated number of undetected species

  • pct_rare ... The percent of rare species as defined by rare_thres

  • PIE ... Hurlbert's PIE (Probability of Interspecific Encounter)

  • S_PIE ... Effective number of species based on PIE

See Details for additional information on the biodiversity statistics.

effort

The standardized number of individuals used for the calculation of rarefied species richness. This must be a single integer.

extrapolate

Boolean which specifies if richness should be extrapolated when effort is larger than the number of individuals using the chao1 method (Chao 1984, 1987). Defaults to TRUE.

return_NA

Boolean in which the rarefaction function returns the observed S when effort is larger than the number of individuals. If set to TRUE then NA is returned. Note that this argument is only relevant when extrapolate = FALSE.

rare_thres

The threshold that determines how the metric pct_rare is computed. It can range from (0, 1] and defaults to 0.05 which specifies that any species with less than or equal to 5 abundance in a sample is considered rare. It can also be specified as "N/S" which results in using average abundance as the threshold which McGill (2011) found to have the best small sample behavior.

scales

The scales to compute the diversity indices for:

  • alpha ... for each row of the site x species community matrix

  • gamma ... for the entire site x species community matrix

  • beta ... the ratio of diversity at the gamma and alpha scales.

Defaults to all three scales: c('alpha', 'gamma', 'beta')

avg_alpha

Boolean if TRUE then the alpha values are averaged. Defaults to FALSE.

PIE_replace

Used for PIE and SPIE. If TRUE, sampling with replacement is used. Otherwise, sampling without replacement (default).

C_target_gamma

When computing coverage based richness (S_C) then this argument can be used to specify the coverage to be used for the gamma scale richness estimate. This defaults to NA in which case the target cover is computed by calc_C_target (i.e., the largest allowable sample size).

...

additional arguments that can be passed to calc_div

Details

BIODIVERSITY INDICES

N: total community abundance is the total number of individuals observed across all species in the sample

S: species richness is the observed number of species that occurs at least once in a sample

S_n: Rarefied species richness is the expected number of species, given a defined number of sampled individuals (n) (Gotelli & Colwell 2001). Rarefied richness at the alpha-scale is calculated for the values provided in effort_samples as long as these values are not smaller than the user-defined minimum value effort_min. In this case the minimum value is used and samples with less individuals are discarded. When no values for effort_samples are provided the observed minimum number of individuals of the samples is used, which is the standard in rarefaction analysis (Gotelli & Colwell 2001). Because the number of individuals is expected to scale linearly with sample area or effort, at the gamma-scale the number of individuals for rarefaction is calculated as the minimum number of samples within groups multiplied by effort_samples. For example, when there are 10 samples within each group, effort_groups equals 10 * effort_samples. If n is larger than the number of individuals in sample and extrapolate = TRUE then the Chao1 (Chao 1984, 1987) method is used to extrapolate the rarefaction curve.

pct_rare: Percent of rare species Is the ratio of the number of rare species to the number of observed species x 100 (McGill 2011). Species are considered rare in a particular sample if they have fewer individuals than rare_thres * N where rare_thres can be set by the user and N is the total number of individuals in the sample. The default value of rare_thres of 0.05 is arbitrary and was chosen because McGill (2011) found this metric of rarity performed well and was generally less correlated with other common metrics of biodiversity. Essentially this metric attempt to estimate what proportion of the species in the same occur in the tail of the species abundance distribution and is therefore sensitive to presence of rare species.

S_asymp: Asymptotic species richness is the expected number of species given complete sampling and here it is calculated using the Chao1 estimator (Chao 1984, Chao 1987) see calc_chao1. Note: this metric is typically highly correlated with S (McGill 2011).

f_0: Undetected species richness is the number of undetected species or the number of species observed 0 times which is an indicator of the degree of rarity in the community. If there is a greater rarity then f_0 is expected to increase. This metric is calculated as S_asymp - S. This metric is less correlated with S than the raw S_asymp metric.

PIE: Probability of intraspecific encounter represents the probability that two randomly drawn individuals belong to the same species. Here we use the definition of Hurlbert (1971), which considers sampling without replacement. PIE is closely related to the well-known Simpson diversity index, but the latter assumes sampling with replacement.

S_PIE: Effective number of species for PIE represents the effective number of species derived from the PIE. It is calculated using the asymptotic estimator for Hill numbers of diversity order 2 (Chao et al. 2014). S_PIE represents the species richness of a hypothetical community with equally-abundant species and infinitely many individuals corresponding to the same value of PIE as the real community. An intuitive interpretation of S_PIE is that it corresponds to the number of dominant (highly abundant) species in the species pool.

For species richness S, rarefied richness S_n, undetected richness f_0, and the Effective Number of Species S_PIE we also calculate beta-diversity using multiplicative partitioning (Whittaker 1972, Jost 2007). That means for these indices we estimate beta-diversity as the ratio of gamma-diversity (total diversity across all plots) divided by alpha-diversity (i.e., average plot diversity).

Value

A data.frame with four columns:

  • scale ... Group label for sites

  • index ... Name of the biodiversity index

  • sample_size ... The number of samples used to compute the statistic, helpful for interpreting beta and gamma metrics.

  • effort ... Sampling effort for rarefied richness (NA for the other indices)

  • gamma_coverage ... The coverage value for that particular effort value on the gamma scale rarefaction curve. Will be NA unless coverage based richness (S_C) and/or beta diversity is computed.

  • value ... Value of the biodiversity index

Author(s)

Felix May and Dan McGlinn

References

Chao, A. 1984. Nonparametric Estimation of the Number of Classes in a Population. Scandinavian Journal of Statistics 11:265–270.

Chao, A. 1987. Estimating the population size for capture-recapture data with unequal catchability. Biometrics, 43, 783-791.

Gotelli, N. J., and R. K. Colwell. 2001. Quantifying biodiversity: procedures and pitfalls in the measurement and comparison of species richness. Ecology Letters 4:379–391.

Hurlbert, S. H. 1971. The nonconcept of species diversity: a critique and alternative parameters. Ecology 52:577–586.

Jost, L. 2007. Partitioning diversity into independent alpha and beta components. Ecology 88:2427–2439.

McGill, B. J. 2011. Species abundance distributions. Pages 105-122 Biological Diversity: Frontiers in Measurement and Assessment, eds. A.E. Magurran and B.J. McGill.

Whittaker, R. H. 1972. Evolution and measurement of species diversity. Taxon 21:213–251.

Examples

data(tank_comm)
div_metrics <- calc_comm_div(tank_comm, 'S')
div_metrics
div_metrics <- calc_comm_div(tank_comm, 'S', avg_alpha = TRUE)
div_metrics
div_metrics <- calc_comm_div(tank_comm, 'S_n', effort = 10, avg_alpha = TRUE)
div_metrics
div_metrics <- calc_comm_div(tank_comm, 'S_C', C_target_gamma = 0.75, avg_alpha = TRUE)
div_metrics

MoBiodiv/mobr documentation built on Oct. 26, 2024, 10:51 a.m.