[R] Fitting a quasipoisson distribution to univariate data
Achim Zeileis
Achim.Zeileis at wu-wien.ac.at
Thu Aug 13 20:02:36 CEST 2009
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.
>
>
More information about the R-help
mailing list