Re: [R] Estimating QAIC using glm with the quasibinomial family

From: Kunio takezawa <>
Date: Thu, 08 May 2008 09:15:46 +0900


>but I was specificly interested in calculating QAIC and QAICc from
>a glm fitted with the "family=quasibinomial" option.

If you use "family=quasibinomial(link = "logit")" in glm(), the program will be:

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=quasibinomial(link = "logit"))    print(out1)
   aic0 <- out1$aic

   dev1 <- out1$deviance
   aic1 <- dev1+ 2*2

   c1 <- 2.5
   qaic1 <- dev1/c1+ 2*2

The result is:
Call: glm(formula = y ~ x, family = quasibinomial(link = "logit"), data = data1)


(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: NA
[1] "aic0"
[1] NA
[1] "aic1"
[1] 16.63054

[1] "qaic1"
[1] 9.052216

   As you pointed out, glm() does not output the value of either AIC or QAIC.
You are supposed to calculate those values. I guess that it is because AIC is not
appropriate for this case, and the concept of QAIC has not been authorized yet.

K. Takezawa

        [[alternative HTML version deleted]] mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu 08 May 2008 - 00:19:46 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 09 May 2008 - 18:30:35 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive