[R] GLMs: Negative Binomial family in R?
Achim Zeileis
Achim.Zeileis at wu-wien.ac.at
Tue Apr 5 19:40:01 CEST 2005
On Tue, 5 Apr 2005 11:20:37 -0600 nflynn at ualberta.ca wrote:
> Greetings R Users!
>
> I have a data set of count responses for which I have made repeated
> observations on the experimental units (stream reaches) over two air
> photo dates, hence the mixed effect. I have been using Dr. Jim
> Lindsey's GLMM function found in his"repeated" measures package with
> the "poisson" family.
>
> My problem though is that I don't think the poisson distribution is
> the right one to discribe my data which is overdispersed; the variance
> is greater than the mean. I have read that the "negative binomial"
> regression models can account for some of the differences among
> observations by adding in a error term that independent of the the
> covariates.
glm.nb() from package MASS fits negative binomial GLMs.
> I haven't yet come across a mixed effects model that can use the
> "negative binomial" distribution.
For known theta, you can plug negative.binomial(theta) into glmmPQL()
for example. (Both functions are also available in MASS.) I'm not sure
whether there is also code available for unknown theta.
> If any of you know of such a function - I will certainly look forward
> to hearing from you! Additionally, if any of you have insight on
> zero-inflated data, and testing for this, I'd be interested in your
> comments too. I'll post a summary of your responses to this list.
Look at package zicounts for zero-inflated Poisson and NB models. For
these models, there is also code available at
http://pscl.stanford.edu/content.html
which also hosts code for hurdle models.
hth,
Z
> Best Regards,
> Nadele Flynn, M.Sc. candidate.
> University of Alberta
>
> ______________________________________________
> 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
>
More information about the R-help
mailing list