bellff: Bell Distribution Family Function

View source: R/family.vd1.R

bellffR Documentation

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.

Details

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

f(y;s) = s^y * exp(1 - exp(s)) * B_y / y!

for y=0(1)Inf 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.

Value

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

Author(s)

T. W. Yee

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

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)

VGAMdata documentation built on March 18, 2022, 8:03 p.m.