Estimating the shape parameter of the Bell distribution by maximum likelihood estimation.
bellff(lshape = "loglink", zero = NULL, gshape = expm1(1.6 * ppoints(7)))
More information is at CommonVGAMffArguments
.
An object of class "vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
,
and vgam
.
The Bell distribution
has a probability density function that can be written
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.
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.
# 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