Nigel Harding
2009-Aug-13 17:43 UTC
[R] Fitting a quasipoisson distribution to univariate data
Dear all, I am analyzing counts of seabirds made from line transects at sea. I have been fitting Poisson and negative binomial distributions to the data using the goodfit function from the vcd library. I would also like to evaluate how well a quasi-poisson distribution fits the data. However, none of the potentially suitable functions I have identified (goodfit(vcd), fitdistr(MASS), fit.dist(gnlm)) includes the quasipoisson distribution as one of their standard named distributions. Is the way forward to supply an appropriate density function to fitdistr, or is there some easier way to fit a quasipoisson distribution? Many thanks Nigel Harding Craigton Ecological Services 48 Craigend Drive West Milngavie Glasgow G62 7BG T: 0141 956 4636 M: 07980 479261
Achim Zeileis
2009-Aug-13 18:02 UTC
[R] Fitting a quasipoisson distribution to univariate data
On Thu, 13 Aug 2009, Nigel Harding wrote:> Dear all, > I am analyzing counts of seabirds made from line transects at sea. > > I have been fitting Poisson and negative binomial distributions to the data > using the goodfit function from the vcd library. I would also like to > evaluate how well a quasi-poisson distribution fits the data. However, none > of the potentially suitable functions I have identified (goodfit(vcd), > fitdistr(MASS), fit.dist(gnlm)) includes the quasipoisson distribution as > one of their standard named distributions. Is the way forward to supply an > appropriate density function to fitdistr, or is there some easier way to fit > a quasipoisson distribution?The quasi-Poisson model is not a likelihood model but a quasi-likelihood model. Thus, you specify mean and variance function but leave the rest of the likelihood unspecified. Therefore, there is no density function with predicted probabilities for each count etc. The easiest way to fit that is to use glm(y ~ 1) which essentially computes mean(y) plus a dispersion parameter based on the residual sum of squares. For a discussion of Poisson, quasi-Poisson, negative binomial, zero-inflated and hurdle count regression models, you can look at: http://www.jstatsoft.org/v27/i08/ hth, Z> Many thanks > > Nigel Harding > Craigton Ecological Services > 48 Craigend Drive West > Milngavie > Glasgow G62 7BG > T: 0141 956 4636 > M: 07980 479261 > > ______________________________________________ > 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. > >
Brian Cady
2009-Oct-19 15:29 UTC
[R] Fitting a quasipoisson distribution to univariate data
Nigel Harding wrote:> > Dear all, > I am analyzing counts of seabirds made from line transects at sea. > > ... is there some easier way to fit > a quasipoisson distribution? >R commander seems to be a relatively easy-to-use front end/GUI for R, to this statistics and computing novice. I start it with 'library(Rcmdr)' It has a quasipoisson model under the menu choice 'Statistics|fit models|Generalized Linear Models' in the family box, way down near the bottom. I am using Rcmdr version 1.4-10 and R version 2.8.1 Brian -- View this message in context: http://www.nabble.com/Fitting-a-quasipoisson-distribution-to-univariate-data-tp24959398p25960344.html Sent from the R help mailing list archive at Nabble.com.
Reasonably Related Threads
- Optimization and Linear Programming in R
- glmmADMB
- Computational Ecologist Job at NOAA in Silver Spring, MD -- Marine Wildlife Spatial Modeling in R
- Does goodfit() require frequency count of the numbers or numbers themselves?
- goodfit() in vcd package: computation of chi-squared