Learn R Programming

fossil (version 0.4.0)

int.chao: Internal function for chao estimators

Description

Computes the Chao species estimator for both chao1 and chao2 estimators

Usage

int.chao(x)

Arguments

x

a vector of positive integers or zero of any length

Value

Estimated numer of species using the Chao estimator.

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.

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

Run this code
# NOT RUN {
## 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)
# }

Run the code above in your browser using DataLab