gMLE.pg: Negative-Binomial Parameter Estimation

Description Usage Arguments Value Author(s) References Examples

View source: R/gMLE.pg.R

Description

Computes Type-II Maximum likelihood estimates \hat{α} and \hat{β} for gamma prior g\sim Gamma(α, β).

Usage

1
gMLE.pg(cnt.vec, exposure = NULL, start.par = c(1,1))

Arguments

cnt.vec

Vector containing Poisson counts.

exposure

Vector containing exposures for each count. The default is no exposure, thus exposure = NULL.

start.par

Initial values that will pass to optim.

Value

Returns a vector where the first component is α and the second component is the scale parameter β for the gamma distribution: \frac{1}{Γ(α)β^α} θ^{α-1}e^{-\frac{θ}{β}}.

Author(s)

Doug Fletcher

References

Koenker, R. and Gu, J., 2017. "REBayes: An R Package for Empirical Bayes Mixture Methods," Journal of Statistical Software, Articles, 82(8), pp. 1-26.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
### without exposure
data(ChildIll)
ill.start <- gMLE.pg(ChildIll)
ill.start
### with exposure
data(NorbergIns)
X <- NorbergIns$deaths
E <- NorbergIns$exposure/344
norb.start <- gMLE.pg(X, exposure = E)
norb.start

BayesGOF documentation built on May 2, 2019, 8:57 a.m.