"Coverage" calculates an estimator of the sample coverage of a community described by its abundance vector. "Coverage2Size" estimates the sample size corresponding to the chosen sample coverage.

Coverage(Ns, Estimator = "Best", Level = NULL, CheckArguments = TRUE)
Coverage2Size(Ns, SampleCoverage, CheckArguments = TRUE)

## Arguments

Ns

A numeric vector containing species abundances.

Estimator

A string containing one of the possible estimators: "ZhangHuang", "Chao", "Turing", "Good". "Best" is for "Chao".

Level

The level of interpolation or extrapolation, i.e. an abundance.

SampleCoverage

The target sample coverage.

CheckArguments

Logical; if TRUE, the function arguments are verified. Should be set to FALSE to save time when the arguments have been checked elsewhere.

## Details

The sample coverage $$C$$ of a community is the total probability of occurence of the species observed in the sample. $$1-C$$ is the probability for an individual of the whole community to belong to a species that has not been sampled.

The historical estimator is due to Turing (Good, 1953). It only relies on singletons (species observed only once). Chao's (Chao and Shen, 2010) estimator uses doubletons too and Zhang-Huang's (Chao et al., 1988; Zhang and Huang, 2007) uses the whole distribution.

If Level is not null, the sample coverage is interpolated or extrapolated. Interpolation by the Good estimator relies on the equality between sampling deficit and the generalized Simpson entropy (Good, 1953). The Chao (2014) estimator allows extrapolation, reliable up a level equal to the double size of the sample.

## Value

"Coverage" returns a named number equal to the calculated sample coverage. The name is that of the estimator used. "Coverage2Size" returns a number equal to the sample size corresponding to the chosen sample coverage.

## Examples

# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest)
data(Paracou618)
# Ns is the vector of abundances of the metacommunity
Ns <- Paracou618.MC\$Ns
# Calculate the sample coverage of the metacommunity
Coverage(Ns)    # Stored in Paracou618.SampleCoverage
#> ZhangHuang
#>  0.9226675