Huso, Manuela
2010-Oct-07 16:39 UTC
[R] How do I set the dispersion parameter in poisson glm?
Dear R users, I would like to fit a glm with Poisson distribution and log link with a known dispersion parameter. I do not want to estimate the dispersion parameter. I know what it is, so I simply want to fix it at a constant for this and other models to follow. My simple, no covariate model is: Tall.glm<-glm(Seedling~1, family=poisson, offset(log(area)), data=tallPSME.df) I want to fix the dispersion parameter at 2.5. How can I do this, please? Many thanks in advance for your help, Manuela>::<>::<>::<>::<>::<>::<>::<>::<>::<Manuela Huso Consulting Statistician 201H Richardson Hall Department of Forest Ecosystems and Society Oregon State University Corvallis, OR 97331 ph: 541-737-6232 fx: 541-737-1393
Achim Zeileis
2010-Oct-07 16:48 UTC
[R] How do I set the dispersion parameter in poisson glm?
On Thu, 7 Oct 2010, Huso, Manuela wrote:> Dear R users, > > I would like to fit a glm with Poisson distribution and log link with a known dispersion parameter. I do not want to estimate the dispersion parameter. I know what it is, so I simply want to fix it at a constant for this and other models to follow. My simple, no covariate model is: > > Tall.glm<-glm(Seedling~1, > family=poisson, > offset(log(area)), > data=tallPSME.df) > > I want to fix the dispersion parameter at 2.5. How can I do this, please?The parameter estimation is invariant to the choice of dispersion parameter, hence you don't have to change anything in the glm() call above. Only for the inference you have to set the dispersion, e.g. summary(Tall.glm, dispersion = 2.5) hth, Z> Many thanks in advance for your help, > > Manuela > >> ::<>::<>::<>::<>::<>::<>::<>::<>::< > Manuela Huso > Consulting Statistician > 201H Richardson Hall > Department of Forest Ecosystems and Society > Oregon State University > Corvallis, OR 97331 > ph: 541-737-6232 > fx: 541-737-1393 > > ______________________________________________ > 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. >
Huso, Manuela
2010-Oct-07 20:22 UTC
[R] How do I set the dispersion parameter in poisson glm?
I was not using a package to calculate QAIC. I will look into your suggestions, though. I thought it would be simple to ask glm to just fix the overdisperion at a particular value. Apparently it is not. Thank you for all you help. Manuela -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Ben Bolker Sent: Thursday, October 07, 2010 12:04 PM To: r-help at stat.math.ethz.ch Subject: Re: [R] How do I set the dispersion parameter in poisson glm? Huso, Manuela <manuela.huso <at> oregonstate.edu> writes:> > Thank you so much for your reply, Z. Of course, you are correct about > the overdispersion not affecting > parameter estimation. But my goal is comparison of several models > using QAIC and the dispersion > parameter enters the QAIC calculation. I suppose I could calculate > the QAIC of all models using my fixed > dispersion parameter, but I was hoping I could just set it in the > glm call and let the software calculate > QAIC appropriately for me.[snip] Which QAIC() function are you using? The ones in the MuMIn,AICcmodavg, and bbmle packages all have parameters that should allow you to set the dispersion parameter when you calculate QAIC. ______________________________________________ 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.
Maybe Matching Threads
- drawing samples based on a matching variable
- parameterization of glm nested design
- Quasi-poisson glm and calculating a qAIC and qAICc...trying to modilfy Bolker et al. 2009 function to work for a glm model
- extracting dispersion parameter from quasipoisson lmer model
- Help with glmer {lme4) function: how to return F or t statistics instead of z statistics.