> I fitted a GAM model with Poisson distribution to a data with about 200 > observations. I noticed that the plot of the residuals versus fitted values > show a trend. Residuals tend to be lower for higher fitted values. Because, > I'm dealing with count data, I'm thinking that this might be due to > overdispersion. Is there a way to account for overdispersion in any of the > packages MGCV or GAM?
You can `allow for' overdispersion in mgcv::gam by using the quasipoisson family, or setting scale to -1 in the gam call. In a straight GLM this would make no difference to the residual plots, since the scale parameter does not change the coefficient estimates. However, things are different for a GAM with automatic smoothness estimations, since the scale parameter does influence the smoothing parameter estimation criterion. Another possibility is to use the negative binomial family from the MASS library, and a third is to use the quasi family. Simon _____________________________________________________________________ > Simon Wood [EMAIL PROTECTED] www.stats.gla.ac.uk/~simon/ >> Department of Statistics, University of Glasgow, Glasgow, G12 8QQ >>> Direct telephone: (0)141 330 4530 Fax: (0)141 330 4814 ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
