| posbinomial {VGAM} | R Documentation |
Fits a positive binomial distribution.
posbinomial(link = "logit", earg = list(),
mv = FALSE, parallel = FALSE, zero = NULL)
link, earg |
Link function and its extra argument for the usual probability parameter.
See |
mv, parallel, zero |
See |
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.
An object of class "vglmff" (see vglmff-class).
The object is used by modelling functions such as vglm,
and vgam.
Under- or over-flow may occur if the data is ill-conditioned.
The input for this family function is the same as
binomialff.
If mv = TRUE then each column of the matrix response
should be a count (the number of successes), and the
weights argument should be a matrix of the same dimension
as the response containing the number of trials.
If mv = FALSE then the response input should be the same
as binomialff.
Yet to be done: a quasi.posbinomial which estimates a
dispersion parameter.
Thomas W. Yee
Patil, G. P. (1962) Maximum likelihood estimation for generalised power series distributions and its application to a truncated binomial distribution. Biometrika, 49, 227–237.
Documentation accompanying the VGAM package at http://www.stat.auckland.ac.nz/~yee contains further information and examples.
# Number of albinotic children in families with 5 kids (from Patil, 1962)
akids = 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, akids, trace = TRUE)
summary(fit1)
Coef(fit1) # = MLE of p = 0.3088
head(fitted(fit1))