bdata <- data.frame(y = 0:11, wts = c(227,123,72,42,21,31,11,14,6,4,7,28))
fit <- vglm(y ~ 1, betageometric, bdata, weight = wts, trace = TRUE)
fitg <- vglm(y ~ 1, geometric, bdata, weight = wts, trace = TRUE)
coef(fit, matrix = TRUE)
Coef(fit)
sqrt(diag(vcov(fit, untransform = TRUE)))
fit@misc$shape1
fit@misc$shape2
# Very strong evidence of a beta-geometric:
pchisq(2*(logLik(fit) - logLik(fitg)), df = 1, lower.tail = FALSE)
Run the code above in your browser using DataLab