Learn R Programming

VGAM (version 0.8-4.1)

benini: Benini Distribution Family Function

Description

Estimating the parameter of the Benini distribution by maximum likelihood estimation.

Usage

benini(y0 = stop("argument 'y0' must be specified"),
       lshape = "loge", earg = list(), ishape = NULL, imethod = 1)

Arguments

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.
imethod
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.

Value

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

Warning

The mean of $Y$, which are returned as the fitted values, may be incorrect.

Details

The Benini distribution has a probability density function that can be written $$f(y) = 2 b \exp(-b[(\log(y/y_0))^2]) \log(y/y_0) / y$$ for $0 < y_0 < y$, and $b>0$. The cumulative distribution function for $Y$ is $$F(y) = 1 - \exp(-b[(\log(y/y_0))^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.

References

Kleiber, C. and Kotz, S. (2003) Statistical Size Distributions in Economics and Actuarial Sciences, Hoboken, NJ: Wiley-Interscience.

See Also

Benini.

Examples

Run this code
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))

Run the code above in your browser using DataLab