[R] quasipoisson, glm.nb and AIC values

Vicente Piorno vpiorno at uvigo.es
Wed Mar 12 19:18:28 CET 2003


Dear R users,
I am having problems trying to fit quasipoisson and negative binomials glm. 
My data set
contains abundance (counts) of a species under different management regimens.
First, I tried to fit a poisson glm:

 > summary(model.p<-glm(abund~mgmtcat,poisson))

       Call:
       glm(formula = abund ~ mgmtcat, family = poisson)
       .
       .
       .
       (Dispersion parameter for poisson family taken to be 1)

             Null deviance: 1904.7  on 19  degrees of freedom
       Residual deviance: 1154.3  on 16  degrees of freedom
       AIC: 1275.4
      Number of Fisher Scoring iterations: 4

Wich suggests the existence of STRONG overdispersion, so I tried:

 > summary(model.qp<-glm(abund~mgmtcat,quasipoisson))

       Call:
       glm(formula = abund ~ mgmtcat, family = quasipoisson)
       .
       .
       .
       (Dispersion parameter for quasipoisson family taken to be 73.51596)

              Null deviance: 1904.7  on 19  degrees of freedom
       Residual deviance: 1154.3  on 16  degrees of freedom
       AIC: NA
      Number of Fisher Scoring iterations: 4

Here I found the first problem: AIC is not available.

I know that count data for the studied species usually show aggregation. 
So, I fitted
a negative binomial glm with the glm.nb in MASS:

 > summary.negbin(model.nb<-glm.nb(abund~mgmtcat))

       Call: glm.nb(formula = abund ~ mgmtcat, init.theta = 
1.23560100958978,  link = log)
       .
       .
       .
       (Dispersion parameter for Negative Binomial(1.2356) family taken to 
be 1)

           Null deviance: 33.173  on 19  degrees of freedom
       Residual deviance: 22.316  on 16  degrees of freedom
       AIC: -15948
       Number of Fisher Scoring iterations: 1

       Correlation of Coefficients:
                (Intercept) mgmtcat1 mgmtcat2
       mgmtcat1     -0.7052
       mgmtcat2     -0.7053   0.4974
       mgmtcat3     -0.7005   0.4940    0.494

                         Theta:  1.236
                   Std. Err.:  0.362
        2 x log-likelihood:  -211.079

And now, I am getting a negative AIC value! I have seen that this problem 
have been discused in the S-news list.
Much of the discussion there is far beyond my statistical and R knowledge. 
One of the solutions proposed there
was adding - lgamma(y +1) to the internal function loglik in glm.nb, but I 
have seen that the current version of
MASS contains that term.

My problem is that I want to compare the quasipoisson and negative binomial 
models, and I have a NA value and a negative one.
Can I obtain an AIC for the quasipoisson model? What about the negative 
AIC? Can I use it or do you think that anything is wrong?

Thanks in advance,


--
Vicente Piorno
Departamento de Ecologia y Biologia Animal - Universidad de Vigo
EUIT Forestal - Campus Universitario
36005 Pontevedra SPAIN



More information about the R-help mailing list