Learn R Programming

VGAM (version 1.1-2)

bellff: Bell Distribution Family Function

Description

Estimating the shape parameter of the Bell distribution by maximum likelihood estimation.

Usage

bellff(lshape = "loglink", zero = NULL, gshape = expm1(1.6 * ppoints(7)))

Arguments

lshape, zero, gshape

More information is at CommonVGAMffArguments.

Value

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

Details

The Bell distribution has a probability density function that can be written $$f(y;s) = \frac{s^y \exp(1 - e^s) B_y}{y!} $$ for \(y=0(1)\infty\) and shape parameter \(0<s\). The mean of \(Y\) is \(\exp(s) s\) (returned as the fitted values). Fisher-scoring is used. This VGAM family function handles multiple responses.

The function bell returns the first 218 Bell numbers as finite numbers, and returns Inf when its argument has a higher value. Hence this VGAM family function can only handle low-value counts of less than 219.

References

Castellares, F. and Ferrari, S. L. P. and Lemonte, A. J. (2018) On the Bell distribution and its associated regression model for count data. Applied Mathematical Modelling, 56, 172--185.

See Also

bell, dbell, poissonff.

Examples

Run this code
# NOT RUN {
bdata <- data.frame(y = rbell(1000, shape = loglink(0.5, inverse = TRUE)))
bfit <- vglm(y ~ 1, bellff, data = bdata, trace = TRUE, crit = "coef")
coef(bfit, matrix = TRUE)
Coef(bfit)
# }

Run the code above in your browser using DataLab