Learn R Programming

VGAM (version 0.9-2)

posbinomial: Positive Binomial Distribution Family Function

Description

Fits a positive binomial distribution.

Usage

posbinomial(link = "logit", mv = FALSE, parallel = FALSE, zero = NULL)

Arguments

link, mv, parallel, zero

Value

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

Warning

Under- or over-flow may occur if the data is ill-conditioned.

Details

The positive binomial distribution is the ordinary binomial distribution but with the probability of zero being zero. Thus the other probabilities are scaled up (i.e., divided by $1-P(Y=0)$). The fitted values are the ordinary binomial distribution fitted values, i.e., the usual mean.

In the capture--recapture literature this model is called the $M_0$ if it is an intercept-only model. Otherwise it is called the $M_h$ when there are covariates. It arises from a sum of a sequence of $\tau$-Bernoulli random variates subject to at least one success (capture). Here, each animal has the same probability of capture or recapture, regardless of the $\tau$ sampling occasions. Independence between animals and between sampling occasions etc. is assumed.

References

Patil, G. P. (1962) Maximum likelihood estimation for generalised power series distributions and its application to a truncated binomial distribution. Biometrika, 49, 227--237.

Pearson, K. (1913) A Monograph on Albinism in Man. Drapers Company Research Memoirs.

See Also

posbernoulli.b, posbernoulli.t, posbernoulli.tb, binomialff.

Examples

Run this code
# Number of albinotic children in families with 5 kids (from Patil, 1962) ,,,,
albinos <- data.frame(y = c(rep(1, 25), rep(2, 23), rep(3, 10), 4, 5),
                      n = rep(5, 60))
fit1 <- vglm(cbind(y, n-y) ~ 1, posbinomial, albinos, trace = TRUE)
summary(fit1)
Coef(fit1)  # = MLE of p = 0.3088
head(fitted(fit1))
sqrt(vcov(fit1, untransform = TRUE))  # SE = 0.0322

# Fit a M_0 model to the Perom data ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
M_0   <- vglm(cbind(    y1 + y2 + y3 + y4 + y5 + y6,
                    6 - y1 - y2 - y3 - y4 - y5 - y6) ~ 1,
              posbinomial, data = Perom, trace = TRUE)
coef(M_0, matrix = TRUE)
Coef(M_0)
constraints(M_0, matrix = TRUE)
summary(M_0)

Run the code above in your browser using DataLab