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, method.init=1)
y0 |
Positive scale parameter.
|
lshape |
Parameter link function applied to the parameter b,
which is the shape parameter.
See Links for more choices.
A log link is the default because b is positive.
|
earg |
List. Extra argument for the link.
See earg in Links for general information.
|
ishape |
Optional initial value for the shape parameter.
The default is to compute the value internally.
|
method.init |
An integer with value 1 or 2 which
specifies the initialization method. If failure to converge occurs
try the other value, or else specify a value for ishape .
|
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 y_0>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
,
rrvglm
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.
y = rbenini(n <- 3000, y0=1, shape=exp(2)) fit = vglm(y ~ 1, benini(y0=1), trace=TRUE, crit="c") coef(fit, matrix=TRUE) Coef(fit) fit@extra$y0 # Apparent discrepancy: fitted(fit)[1:5] mean(y)