Learn R Programming

VGAM (version 0.8-2)

expgeometric: Exponential geometric Distribution Family Function

Description

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

Usage

expgeometric(lscale = "loge", lshape = "logit",
             escale = list(), eshape = list(),
             iscale = NULL,   ishape = NULL,
             zero = 1, nsimEIM = 400)

Arguments

lscale, lshape
Link function for the two parameters. See Links for more choices.
escale, eshape
List. Extra argument for each of the links. See earg in Links for general information.
iscale, ishape
Numeric. Optional initial values for the scale and shape parameters.
zero, nsimEIM

Value

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

Details

The exponential geometric distribution has density function $$f(y; c = scale, s = shape) = c (1 - s) e^{-c y} (1 - s e^{-c y})^{-2}$$ where $y > 0$, $c > 0$ and $s \in (0, 1)$. The mean is $((s-1)/(sc)) \log(1-s)$ is returned as the fitted values. Note the median is $(1/c) \log(2-s)$.

References

Adamidis, K., Loukas, S. (1998). A lifetime distribution with decreasing failure rate. Statistics and Probability Letters, 39, 35--42.

See Also

dexpgeom, exponential, geometric.

Examples

Run this code
scale = exp(2); shape = logit(-1, inverse = TRUE);
edata = data.frame(y = rexpgeom(n = 2000, scale=scale, shape=shape))
fit = vglm(y ~ 1, expgeometric, edata, trace = TRUE)
c(with(edata, mean(y)), head(fitted(fit), 1))
coef(fit, matrix = TRUE)
Coef(fit)
summary(fit)

Run the code above in your browser using DataLab