Poisson-compound Gamma estimator for the species richness

Share:

Description

Function to calculate the Poisson-compound 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.

Usage

1
pcg(n,t=35,C=0,alpha=c(1:10),b=200,seed=NULL,conf=0.95,dis=1)

Arguments

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. t is the cutoff value defining the relatively less abundant species to be used in estimation. The default value for t=35. The estimator is more sensitive to t compared with pnpmle or unpmle estimators. We recommend to use t ≥ 20 if the maximum frequency (j) is greater than 20. Otherwise use the maximum frequency of j for t.

C

integer either 0 or 1. It specifies whether bootstrap confidence interval should be calculated. “C=1” for YES and “C=0” for NO.The default of C is set as 0.

b

integer. b specifies the number of bootstrap samples to be generated for confidence interval. It is ignored if “C=0”.

alpha

a positive grid for Gamma shape parameter. alpha must be a numerical vector for positive numbers. A cross-validation will be used to select a unified shape parameter value for the compound Gamma from the specified “alpha” grid. The default “alpha” grid is 1,2,…,10.

conf

a positive number ≤ 1. conf specifies the confidence level for confidence interval. The default is 0.95.

seed

a single value, interpreted as an integer. Seed for random number generation

dis

0 or 1. 1 for on-screen display of the mixture output, and 0 for none.

Details

The pcg estimator is computing intensive. The computing of bootstrap confidence interval may take up to a few hours.

Value

The function pcg returns a list of: Nhat, CI (if “C=1”) and AlphaModel.

Nhat

point estimate of N.

CI

bootstrap confidence interval.

AlphaModel

unified shape parameter of compound Gamma selected from cross-validation.

Author(s)

Ji-Ping Wang, Department of Statistics, Northwestern University

References

Wang, J.-P. (2010), Estimating the species richness by a Poisson-Compound Gamma model, 97(3): 727-740

Examples

 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)