head(prinia)
summary(prinia)
rowSums(prinia[, c("cap", "noncap")]) # 19s
# Fit a positive-binomial distribution (M.h) to the data:
fit1 <- vglm(cbind(cap, noncap) ~ length + fat, posbinomial, data = prinia)
# Fit another positive-binomial distribution (M.h) to the data:
# The response input is suitable for posbernoulli.*-type functions.
fit2 <- vglm(cbind( y1, y2, y3, y4, y5, y6, y7, y8, y9,
y10, y11, y12, y13, y14, y15, y16, y17, y18, y19) ~
length + fat, posbernoulli.b(drop.b = FALSE ~ 0), data = prinia)
Run the code above in your browser using DataLab