int.chao: Internal function for chao estimators

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Computes the Chao species estimator for both chao1 and chao2 estimators

Usage

1

Arguments

x

a vector of positive integers or zero of any length

Details

This function is typically only called internally by the functions chao1 and chao2. The function has a built in bias correction, such that it will not return values of infinity or non-numbers.

Value

Estimated numer of species using the Chao estimator.

Author(s)

Matthew Vavrek

References

Chao, A. 1984. Nonparametric estimation of the number of classes in a population. Scandinavian Journal of Statistics 11: 265-270.

See Also

For the more useful implementations of the Chao estimator, see chao1 for the abundance based estimator or chao2 for the incidence based estimator

Examples

1
2
3
4
5
6
7
## create example data set
a<-c(4,5,1,1,2,0,0,1,3,0,8,45,23)
int.chao(a)

## a data set which would give NaN using classic (ie not bias corrected) version
a<-c(4,5,0,0,2,0,0,0,3,0,8,45,23)
int.chao(a)

Example output

Loading required package: sp
Loading required package: maps
Loading required package: shapefiles
Loading required package: foreign

Attaching package: 'shapefiles'

The following objects are masked from 'package:foreign':

    read.dbf, write.dbf

[1] 14.5
[1] 7

fossil documentation built on March 23, 2020, 5:06 p.m.