pcg | R Documentation |
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.
pcg(n,t=35,C=0,alpha=c(1:10),b=200,seed=NULL,conf=0.95,dis=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 |
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 |
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. |
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 cross-validation. |
Ji-Ping Wang, Department of Statistics, Northwestern University
Wang, J.-P. (2010), Estimating the species richness by a Poisson-Compound Gamma model, 97(3): 727-740
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.