Function to calculate the Poissoncompound Gamma estimators of the species number by Wang 2010. This method is essentially a conditional NPMLE method. The species abundance here is assumed to follow a compound Gamma model. The confidence interval is obtained based on a bootstrap procedure. A Fortran function is called to for the computing. This function requires Fortran compiler installed.
1 
n 
a matrix or a numerical data frame of two columns. It is also called the “frequency of frequencies” data in literature. The first column is the frequency j=1, 2…; and the second column is n_j, the number of species observed with j individuals in the sample. 
t 
a positive integer. 
C 
integer either 0 or 1. It specifies whether bootstrap confidence interval should be calculated. “ 
b 
integer. 
alpha 
a positive grid for Gamma shape parameter. 
conf 
a positive number ≤ 1. 
seed 
a single value, interpreted as an integer. Seed for random number generation 
dis 
0 or 1. 1 for onscreen display of the mixture output, and 0 for none. 
The pcg
estimator is computing intensive. The computing of bootstrap confidence interval may take up to a few hours.
The function pcg
returns a list of: Nhat
, CI
(if “C
=1”) and AlphaModel
.
Nhat 
point estimate of 
CI 
bootstrap confidence interval. 
AlphaModel 
unified shape parameter of compound Gamma selected from crossvalidation. 
JiPing Wang, Department of Statistics, Northwestern University
Wang, J.P. (2010), Estimating the species richness by a PoissonCompound Gamma model, 97(3): 727740
1 2 3 4 5 6 7 8 9 10 11  library(SPECIES)
##load data from the package,
## \dQuote{butterfly} is the famous butterfly data by Fisher 1943.
data(butterfly)
##output estimate without confidence interval using cutoff t=15
##pcg(butterfly,t=20,C=0,alpha=c(1:10))
##output estimate with confidence interval using cutoff t=15
#pcg(butterfly,t=20,C=1,alpha=c(1:10),b=200)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.