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