Calculate biodiversity statistics from sites by species table.
calc_biodiv(
abund_mat,
groups,
index,
effort,
extrapolate,
return_NA,
rare_thres
)
A data.frame
with four columns:
group
... Group label for sites
index
... Name of the biodiversity index
effort
... Sampling effort for rarefied richness
(NA for the other indices)
value
... Value of the biodiversity index
Sites by species table with species abundances in the respective cells
Vector with group labels for the sites. The length of the vector has to correspond to the number of rows of the sites by species table.
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_asymp
... Estimated asymptotic species richness
f_0
... Estimated number of undetected species
pct_rare
... The percent of species with abundances below rare_thres
PIE
... Hurlbert's PIE (Probability of Interspecific Encounter)
S_PIE
... Effective number of species based on PIE
See the documentation of get_mob_stats
for further details on the
biodiversity indices.
The standardized number of individuals used for the calculation of rarefied species richness. This can a be single value or an integer vector.
Boolean which specifies if richness should be extrapolated when effort is larger than the number of individuals using the chao1 method.
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
.
The threshold that determines how 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 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.
Felix May and Dan McGlinn
This function is primarily intended as auxiliary function used in
get_mob_stats
, but can be also used directly for data exploration.
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.