View source: R/family.others.R
expgeometric | R Documentation |
Estimates the two parameters of the exponential geometric distribution by maximum likelihood estimation.
expgeometric(lscale = "loglink", lshape = "logitlink",
iscale = NULL, ishape = NULL,
tol12 = 1e-05, zero = 1, nsimEIM = 400)
lscale , lshape |
Link function for the two parameters.
See |
iscale , ishape |
Numeric. Optional initial values for the scale and shape parameters. |
tol12 |
Numeric. Tolerance for testing whether a parameter has value 1 or 2. |
zero , nsimEIM |
See |
The exponential geometric distribution has density function
f(y; c = scale, s = shape) =
(1/c) (1 - s) e^{-y/c} (1 - s e^{-y/c})^{-2}
where y > 0
, c > 0
and s \in (0, 1)
.
The mean, (c (s - 1)/ s) \log(1 - s)
is returned as the fitted values.
Note the median is c \log(2 - s)
.
Simulated Fisher scoring is implemented.
An object of class "vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
and vgam
.
We define scale
as the reciprocal of the scale parameter
used by Adamidis and Loukas (1998).
J. G. Lauder and T. W. Yee
Adamidis, K., Loukas, S. (1998). A lifetime distribution with decreasing failure rate. Statistics and Probability Letters, 39, 35–42.
dexpgeom
,
exponential
,
geometric
.
## Not run:
Scale <- exp(2); shape = logitlink(-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)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.