50% off: Unlimited data and AI learning.
The State of Data & AI Literacy 2025

VGAM (version 1.0-6)

inv.binomial: Inverse Binomial Distribution Family Function

Description

Estimates the two parameters of an inverse binomial distribution by maximum likelihood estimation.

Usage

inv.binomial(lrho = extlogit(min = 0.5, max = 1),
             llambda = "loge", irho = NULL, ilambda = NULL, zero = NULL)

Arguments

lrho, llambda

Link function for the ρ and λ parameters. See Links for more choices.

irho, ilambda

Numeric. Optional initial values for ρ and λ.

Value

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

Details

The inverse binomial distribution of Yanagimoto (1989) has density function f(y;ρ,λ)=λΓ(2y+λ)Γ(y+1)Γ(y+λ+1){ρ(1ρ)}yρλ where y=0,1,2, and 12<ρ<1, and λ>0. The first two moments exist for ρ>12; then the mean is λ(1ρ)/(2ρ1) (returned as the fitted values) and the variance is λρ(1ρ)/(2ρ1)3. The inverse binomial distribution is a special case of the generalized negative binomial distribution of Jain and Consul (1971). It holds that Var(Y)>E(Y) so that the inverse binomial distribution is overdispersed compared with the Poisson distribution.

References

Yanagimoto, T. (1989) The inverse binomial distribution as a statistical model. Communications in Statistics: Theory and Methods, 18, 3625--3633.

Jain, G. C. and Consul, P. C. (1971) A generalized negative binomial distribution. SIAM Journal on Applied Mathematics, 21, 501--513.

Jorgensen, B. (1997) The Theory of Dispersion Models. London: Chapman & Hall

See Also

negbinomial, poissonff.

Examples

Run this code
# NOT RUN {
idata <- data.frame(y = rnbinom(n <- 1000, mu = exp(3), size = exp(1)))
fit <- vglm(y ~ 1, inv.binomial, data = idata, trace = TRUE)
with(idata, c(mean(y), head(fitted(fit), 1)))
summary(fit)
coef(fit, matrix = TRUE)
Coef(fit)
sum(weights(fit))  # Sum of the prior weights
sum(weights(fit, type = "work"))  # Sum of the working weights
# }

Run the code above in your browser using DataLab