[R] AIC for quasipoisson link

Marc Schwartz marc_schwartz at comcast.net
Fri Oct 31 20:29:45 CET 2008


on 10/31/2008 01:07 PM Antonio.Gasparrini at lshtm.ac.uk wrote:
> Dear fellows,
>  
> I'm trying to extract the AIC statistic from a GLM model with quasipoisson link.
> The formula I'm referring to is 
>  
> AIC = -2(maximum loglik) + 2df * phi
>  
> with phi the overdispersion parameter, as reported in:
>  
> Peng et al., Model choice in time series studies os air pollution and mortality. J R Stat Soc A, 2006; 162: pag 190.
>  
> Unfortunately, the function logLik doesn't work for a quasipoisson link.
> Do you know a fast method to extract the AIC for these models?
>  
> Thanks in advance

I was under the impression that there is no log likelihood for quasi*
family models, thus no AIC, which is why they are not calculated/printed
in the glm() summary outputs.

If you want to model overdispersed data and need the AIC, you should
look at glm.nb() in MASS for a negative binomial model:

  library(MASS)
  ?glm.nb

This would also avail you of the anova.glm() methods for comparing
models, which the quasi* families would not.

You might also want to look at:

  http://cran.r-project.org/web/packages/pscl/vignettes/countreg.pdf

which is the vignette from the pscl package.

HTH,

Marc Schwartz



More information about the R-help mailing list