benini {VGAM} | R Documentation |
Estimating the parameter of the Benini distribution by maximum likelihood estimation.
benini(y0 = stop("argument 'y0' must be specified"), lshape = "loge", earg = list(), ishape = NULL, imethod = 1)
y0 |
Positive scale parameter. |
lshape |
Parameter link function applied to the parameter b,
which is the shape parameter.
See |
earg |
List. Extra argument for the link.
See |
ishape |
Optional initial value for the shape parameter. The default is to compute the value internally. |
imethod |
An integer with value |
The Benini distribution has a probability density function that can be written
f(y) = 2*b*exp(-b * [(log(y/y0))^2]) * log(y/y0) / y
for 0<y0<y, and b>0. The cumulative distribution function for Y is
F(y) = 1 - exp(-b * [(log(y/y0))^2]).
Here, Newton-Raphson and Fisher scoring coincide.
On fitting, the extra
slot has a component called y0
which
contains the value of the y0
argument.
An object of class "vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
,
and vgam
.
The mean of Y, which are returned as the fitted values, may be incorrect.
Yet to do: the 2-parameter Benini distribution estimates y0 as well, and the 3-parameter Benini distribution estimates another shape parameter a too.
T. W. Yee
Kleiber, C. and Kotz, S. (2003) Statistical Size Distributions in Economics and Actuarial Sciences, Hoboken, NJ: Wiley-Interscience.
y0 = 1 bdata = data.frame(y = rbenini(n = 3000, y0 = y0, shape = exp(2))) fit = vglm(y ~ 1, benini(y0 = y0), bdata, trace = TRUE, crit = "coef") coef(fit, matrix = TRUE) Coef(fit) fit@extra$y0 head(fitted(fit), 1) # Apparent discrepancy: with(bdata, mean(y))