Computes the Chao species estimator for abundance or presence-absence data
chao1(x, taxa.row = TRUE)
chao2(x, taxa.row = TRUE)
a vector, matrix or data frame with species by samples
a logical argument if the species are the rows or columns
returns a value for the Chao Species Estimator for a the given data.
chao1
will return an estimate of species richness based on a vector or matrix of abundance data, while chao2
will return an estimate of species richness based on incidence data. Note that chao1
estimator is for abundance data only. The chao2
estimator can be given abundance data and it will automagically convert it to incidence data, but due to the nature of the estimator, the data must contain more than one sample (ie the data must be arranged in a minimum 2 by 2 matrix).
Chao, A. 1984. Non-parametric estimation of the number of classes in a population. Scandinavian Journal of Statistics 11: 265-270.
Chao, A. 1987. Estimating the Population Size for Capture-Recapture Data with Unequal Catchability. Biometrics 43: 783-791.
# NOT RUN {
## sample vector
a<-c(0,5,1,1,2,0,0,1,0,0,8,45)
chao1(a)
## matrix format
a<-matrix(c(0,5,1,1,2,0,0,1,0,0,8,45),4,3)
chao1(a)
chao2(a)
## presence absence matrix
a<-matrix(c(0,1,1,1,1,0,0,1,0,0,1,1),4,3)
chao1(a)
chao2(a)
# }
Run the code above in your browser using DataLab