# benini: Benini Distribution Family Function In VGAM: Vector Generalized Linear and Additive Models

## Description

Estimating the 1-parameter Benini distribution by maximum likelihood estimation.

## Usage

 ```1 2 3 4``` ```benini1(y0 = stop("argument 'y0' must be specified"), lshape = "loglink", ishape = NULL, imethod = 1, zero = NULL, parallel = FALSE, type.fitted = c("percentiles", "Qlink"), percentiles = 50) ```

## Arguments

 `y0` Positive scale parameter. `lshape` Parameter link function and extra argument of the parameter b, which is the shape parameter. See `Links` for more choices. A log link is the default because b is positive. `ishape` Optional initial value for the shape parameter. The default is to compute the value internally. `imethod, zero, parallel` Details at `CommonVGAMffArguments`. `type.fitted, percentiles` See `CommonVGAMffArguments` for information. Using `"Qlink"` is for quantile-links in VGAMextra.

## Details

The Benini distribution has a probability density function that can be written

f(y) = 2*s*exp(-s * [(log(y/y0))^2]) * log(y/y0) / y

for 0 < y0 < y, and shape s > 0. The cumulative distribution function for Y is

F(y) = 1 - exp(-s * [(log(y / y0))^2]).

Here, Newton-Raphson and Fisher scoring coincide. The median of Y is now returned as the fitted values, by default. This VGAM family function can handle a multiple responses, which is inputted as a matrix.

On fitting, the `extra` slot has a component called `y0` which contains the value of the `y0` argument.

## Value

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

## Note

Yet to do: the 2-parameter Benini distribution estimates another shape parameter a too. Hence, the code may change in the future.

T. W. Yee

## References

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

`Benini`.

## Examples

 ```1 2 3 4 5 6 7``` ```y0 <- 1; nn <- 3000 bdata <- data.frame(y = rbenini(nn, y0 = y0, shape = exp(2))) fit <- vglm(y ~ 1, benini1(y0 = y0), data = bdata, trace = TRUE) coef(fit, matrix = TRUE) Coef(fit) fit@extra\$y0 c(head(fitted(fit), 1), with(bdata, median(y))) # Should be equal ```

### Example output

```Loading required package: stats4
VGLM    linear loop  1 :  loglikelihood = 245.879872
VGLM    linear loop  2 :  loglikelihood = 245.879875
VGLM    linear loop  3 :  loglikelihood = 245.879875
loge(shape)
(Intercept)    2.002979
shape
7.411103
[1] 1
[1] 1.357743 1.360084
```

VGAM documentation built on Jan. 16, 2021, 5:21 p.m.