# NOT RUN {
data(orob2)
fm <- betabin(cbind(y, n - y) ~ seed, ~ 1,
link = "logit", data = orob2)
#Pearson's chi-squared goodness-of-fit statistic
sum(residuals(fm, type = "pearson")^2)
# }
Run the code above in your browser using DataLab