An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110407/6c3c16fa/attachment.pl>
Quasipoisson with geeglm
3 messages · Søren Højsgaard, JANSEN, Ivy
Dear Ivy, In gee there is no quasipossion, because gee is in a way already quasi. With GEE we do not fit a poisson glm, but use in the construction of the sandwich covariance matrix the variance function of the poisson family. In Gee always an 'overdispersion' is estimated. Regards S?ren ________________________________________ Fra: r-help-bounces at r-project.org [r-help-bounces at r-project.org] På vegne af JANSEN, Ivy [Ivy.JANSEN at inbo.be] Sendt: 7. april 2011 13:32 Til: r-help at r-project.org Emne: [R] Quasipoisson with geeglm Dear all, I am trying to use the GEE methodology to fit a trend for the number of butterflies observed at several sites. In total, there are 66 sites, and 19 years for which observations might be available. However, only 326 observations are available (instead of 1254). For the time being, I ignore the large number of missing values, and the fact that GEE is only valid under MCAR. When I run the following code geeglm(SumOfButterflies ~ RES_YEAR, family = poisson, data = ManijurtNoNA, id = RES_ROTE_ID, corstr = "ar1") I obtain "normal" output. Not surprisingly, overdispersion is present (Estimated Scale Parameters: [1] 185.8571), so changing to quasipoisson is needed. However, the code below geeglm(SumOfButterflies ~ RES_YEAR, family = quasipoisson, data = ManijurtNoNA, id = RES_ROTE_ID, corstr = "ar1") produces the following error Error in geese.fit(xx, yy, id, offset, soffset, w, waves = waves, zsca, : variance invalid. Other correlation structures encounter the same problem. I also tried adding "waves = RES_YEAR" (although I am not sure how waves should be used correctly), but it does not change anything. Any suggestions what might be wrong? Regards, Ivy ______________________________________________ R-help at 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.
Thanks a lot for the answer. So in fact, without knowing, I was already doing the correct thing ;-) Regards, Ivy -----Oorspronkelijk bericht----- Van: S?ren H?jsgaard [mailto:Soren.Hojsgaard at agrsci.dk] Verzonden: donderdag 7 april 2011 17:05 Aan: JANSEN, Ivy; r-help at r-project.org Onderwerp: SV: Quasipoisson with geeglm Dear Ivy, In gee there is no quasipossion, because gee is in a way already quasi. With GEE we do not fit a poisson glm, but use in the construction of the sandwich covariance matrix the variance function of the poisson family. In Gee always an 'overdispersion' is estimated. Regards S?ren ________________________________________ Fra: r-help-bounces at r-project.org [r-help-bounces at r-project.org] På vegne af JANSEN, Ivy [Ivy.JANSEN at inbo.be] Sendt: 7. april 2011 13:32 Til: r-help at r-project.org Emne: [R] Quasipoisson with geeglm Dear all, I am trying to use the GEE methodology to fit a trend for the number of butterflies observed at several sites. In total, there are 66 sites, and 19 years for which observations might be available. However, only 326 observations are available (instead of 1254). For the time being, I ignore the large number of missing values, and the fact that GEE is only valid under MCAR. When I run the following code geeglm(SumOfButterflies ~ RES_YEAR, family = poisson, data = ManijurtNoNA, id = RES_ROTE_ID, corstr = "ar1") I obtain "normal" output. Not surprisingly, overdispersion is present (Estimated Scale Parameters: [1] 185.8571), so changing to quasipoisson is needed. However, the code below geeglm(SumOfButterflies ~ RES_YEAR, family = quasipoisson, data = ManijurtNoNA, id = RES_ROTE_ID, corstr = "ar1") produces the following error Error in geese.fit(xx, yy, id, offset, soffset, w, waves = waves, zsca, : variance invalid. Other correlation structures encounter the same problem. I also tried adding "waves = RES_YEAR" (although I am not sure how waves should be used correctly), but it does not change anything. Any suggestions what might be wrong? Regards, Ivy ______________________________________________ R-help at 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.