Learn R Programming

VGAM (version 0.9-1)

exppoisson: Exponential Poisson Distribution Family Function

Description

Estimates the two parameters of the exponential Poisson distribution by maximum likelihood estimation.

Usage

exppoisson(llambda = "loge", lbetave = "loge",
           ilambda = 1.1, ibetave = 2, zero = NULL)

Arguments

llambda, lbetave
Link function for the two positive parameters. See Links for more choices.
ilambda, ibetave
Numeric. Initial values for the lambda and betave parameters. Currently this function is not intelligent enough to obtain better initial values.

Value

  • An object of class "vglmff" (see vglmff-class). The object is used by modelling functions such as vglm and vgam.

Warning

This VGAM family function does not work properly!

Details

The exponential Poisson distribution has density function $$f(y; \lambda = shape, \beta = scale) = \frac{\lambda \beta}{1 - e^{-\lambda}} \, e^{-\lambda - \beta y + \lambda \exp{(-\beta y)}}$$ where $y > 0$ and the parameters shape, $\lambda$, and scale, $\beta$, are positive. The distribution implies a population facing discrete hazard rates which are multiples of a base hazard. This VGAM family function requires the hypergeo package (to use their genhypergeo function).

References

Kus, C., (2007). A new lifetime distribution. Computational Statistics and Data Analysis, 51, 4497--4509.

See Also

dexppois, exponential, poisson.

Examples

Run this code
lambda = exp(1); betave = exp(2)
rdata = data.frame(y = rexppois(n = 1000, lambda, betave))
library(hypergeo)
fit = vglm(y ~ 1, exppoisson, rdata, trace = TRUE)
c(with(rdata, mean(y)), head(fitted(fit), 1))
coef(fit, matrix = TRUE)
Coef(fit)
summary(fit)

Run the code above in your browser using DataLab