Chat.Ind: Estimate sample coverage

View source: R/fromSpadeR.R

Chat.IndR Documentation

Estimate sample coverage

Description

Computes Chao and Jost 2012's estimate of sample coverage, assuming that individuals are independently and randomly sampled. This function computes rarefaction and extrapolation estimates of coverage given an integer sample size m. We modified the source code to default to observed sample size for convenience, and so that parameter names matched analogous use elsewhere in the MeanRarity package. This function is copied directly from SpadeR:::Chat.Ind() from the R package SpadeR 0.1.1 by Anne Chao, K. H. Ma, T. C. Hsieh and Chun-Huo Chiu.

Usage

Chat.Ind(ab, m = sum(ab))

Arguments

ab

A numeric vector of species abundances or relative abundances.

m

Scalar, sample size at which to estimate coverage.

Value

Scalar between 0 and 1, estimated sample coverage.

References

\insertRef

Chao2012aMeanRarity

Examples


# generate sample
abs <- sample_infinite(fit_SAD(rich = 50, simpson = 20)[[3]], 150)

# estimate coverage of sample
Chat.Ind(abs)

# estimate coverage under rarefaction
Chat.Ind(abs, m = 100)

mikeroswell/MeanRarity documentation built on May 5, 2024, 4:50 p.m.