R-users E-mail: r-help@r-project.org >My question is: Will this calculation be valid with the residual deviance >returned by the glm() function using the quasibinomial family as >reported in R?
Let me show you a simple example, assuming c=2.5: function () { xx <- c(1,2,3,4,5,6,7,8,9,10) yy <- c(1,0,1,0,0,1,0,1,1,1) data1 <- data.frame(x=xx, y=yy) out1 <- glm(y~x, data=data1, family=binomial) print(out1) aic0 <- out1$aic print("aic0") print(aic0) dev1 <- out1$deviance aic1 <- dev1+ 2*2 print("aic1") print(aic1) c1 <- 2.5 qaic1 <- dev1/c1+ 2*2 print("qaic1") print(qaic1) } The result is: Call: glm(formula = y ~ x, family = binomial, data = data1) Coefficients: (Intercept) x -0.7300 0.2131 Degrees of Freedom: 9 Total (i.e. Null); 8 Residual Null Deviance: 13.46 Residual Deviance: 12.63 AIC: 16.63 [1] "aic0" [1] 16.63054 [1] "aic1" [1] 16.63054 [1] "qaic1" [1] 9.052216 I hope that this R program will be of some help to you. K. Takezawa [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.