# Poisson-compound Gamma estimator for the species richness

### 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 |

### 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 |

`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. |

### 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 |

`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)
``` |

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.