estimateD: Compute species diversity with a particular level of sample...

estimateDR Documentation

Compute species diversity with a particular level of sample size/coverage

Description

estimateD: computes species diversity (Hill numbers with q = 0, 1 and 2) with a particular user-specified level of sample size or sample coverage.

Usage

estimateD(
  x,
  q = c(0, 1, 2),
  datatype = "abundance",
  base = "size",
  level = NULL,
  nboot = 50,
  conf = 0.95
)

Arguments

x

a matrix, data.frame (species by sites), or list of species abundances or incidence frequencies.
If datatype = "incidence_freq", then the first entry of the input data must be total number of sampling units, followed by species incidence frequencies in each column or list.

q

a number or vector specifying the diversity order(s) of Hill numbers.

datatype

data type of input data: individual-based abundance data (datatype = "abundance"), sampling-unit-based incidence frequencies data (datatype = "incidence_freq") or species by sampling-units incidence matrix (datatype = "incidence_raw").

base

comparison base: sample-size-based (base="size") or coverage-based
(base="coverage").

level

a sequence specifying the particular sample sizes or sample coverages(between 0 and 1). If base="size" and level=NULL, then this function computes the diversity estimates for the minimum among all double reference sample sizes. If base="coverage" and level=NULL, then this function computes the diversity estimates for the minimum among all the coverage values for samples extrapolated to double the reference sample sizes.

nboot

the number of bootstrap times to obtain confidence interval. If confidence interval is not desired, use 0 to skip this time-consuming step; default is 50.

conf

a positive number < 1 specifying the level of confidence interval; default is 0.95.

Value

a data.frame of species diversity table including the sample size, sample coverage, method (rarefaction or extrapolation), and diversity estimates with the user-specified diversity orders (q values) and specified sample size or sample coverage.

Examples

data(spider)
out1 <- estimateD(spider, q = c(0,1,2), datatype = "abundance", base="size")
out1
## Not run: 
out2 <- estimateD(spider, q = c(0,1,2), datatype = "abundance", base="coverage")
out2

data(ant)
out <- estimateD(ant, q = c(0,1,2), datatype = "incidence_freq", base="coverage", 
                 level=0.985, conf=0.95)
out

## End(Not run)

iNEXT documentation built on May 29, 2024, 5:57 a.m.