wayne hallstrom
2007-Aug-03 23:16 UTC
[R] extracting dispersion parameter from quasipoisson lmer model
Hi, I would like to obtain the dispersion parameter for a quasipoisson model for later use in calculating QAIC values for model comparison.Can anyone suggest a method of how to go about doing this? The idea I have now is that I could use the residual deviance divided by the residual degrees of freedom to obtain the dispersion parameter. The residual deviance is available in the summary output for the lmer model. The problem with this idea is that the residual degrees of freedom is not directly available. I have been assuming that the estimated/approximate DF can be obtained through the formula listed below, and then subsequently used to obtain the dispersion parameter as described above. Is this correct? samp.m4 <- mcmcsamp(m4, n = 1000) print(summary(samp.m4)) (eDF <- mean(samp.m4[,"deviance"]) - deviance(m4, REML=FALSE)) # potentially useful approximate DF? However, rather than going through this roundabout, there appears to be an easier way to obtain the dispersion parameter. I have noted that the 'quasibinomial' produces a dispersion parameter in the model output, but the 'quasipoisson' output does not contain this useful number. Given that each of my models is fit by lmer with a quasipoisson distribution, the program must be internally calculating the dispersion parameter as it runs. Perhaps there is a way to obtain this number directly since I assume it has already been calculated? Can somone who has experience with this code provide some advice on whether this is possible and how I might manage to do this? Thank you for your time, Wayne Hallstrom 403-370-3832 --------------------------------- [[alternative HTML version deleted]]
liujb
2009-Mar-10 19:48 UTC
[R] extracting dispersion parameter from quasipoisson lmer model
Hello, I have the exact same question: how to extract dispersion parameter from lmer() quasipoisson model? I did a search here and saw this post. However, I do not see answer. Could somebody please help? Thank you very much, Julia wayne hallstrom wrote:> > Hi, > I would like to obtain the dispersion parameter for a quasipoisson model > for later use in calculating QAIC values for model comparison.Can anyone > suggest a method of how to go about doing this? > > The idea I have now is that I could use the residual deviance divided by > the residual degrees of freedom to obtain the dispersion parameter. The > residual deviance is available in the summary output for the lmer model. > The problem with this idea is that the residual degrees of freedom is not > directly available. I have been assuming that the estimated/approximate DF > can be obtained through the formula listed below, and then subsequently > used to obtain the dispersion parameter as described above. Is this > correct? > > samp.m4 <- mcmcsamp(m4, n = 1000) > print(summary(samp.m4)) > (eDF <- mean(samp.m4[,"deviance"]) - deviance(m4, REML=FALSE)) > # potentially useful approximate DF? > > > However, rather than going through this roundabout, there appears to be > an easier way to obtain the dispersion parameter. I have noted that the > 'quasibinomial' produces a dispersion parameter in the model output, but > the 'quasipoisson' output does not contain this useful number. Given that > each of my models is fit by lmer with a quasipoisson distribution, the > program must be internally calculating the dispersion parameter as it > runs. Perhaps there is a way to obtain this number directly since I assume > it has already been calculated? Can somone who has experience with this > code provide some advice on whether this is possible and how I might > manage to do this? > > > Thank you for your time, > > Wayne Hallstrom > 403-370-3832 > > > > > --------------------------------- > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch 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. > >-- View this message in context: http://www.nabble.com/extracting-dispersion-parameter-from-quasipoisson-lmer-model-tp11992221p22441798.html Sent from the R help mailing list archive at Nabble.com.
Maybe Matching Threads
- lmer and estimation of p-values: error with mcmcpvalue()
- quasipoisson, glm.nb and AIC values
- Comparing output from linear regression to output from quasipoisson to determine the model that fits best.
- computation of dispersion parameter in quasi-poisson glm
- glm poisson and quasipoisson