[R] Neg Binomial In GEE
Ben Bolker
bbolker at gmail.com
Mon Jun 27 20:22:22 CEST 2011
SamiC <s.cox.10 <at> aberdeen.ac.uk> writes:
>
> Hi, I want to fit a GEE with a negative binomial distribution. I have uesd
> already a poisson glm and then neg binommial to deal with alot of
> dispersion. In my neg binomial residuals i have some patterns so i have
> implemented a GEE, but only with a poisson family as i couldnt with neg
> binomial. However the residual patterns in fact look worse here. When i
> try and put neg binomial family it wants a value of theta?? I am using the
> geepack package.
>
Give us a (small, simple) reproducible example please?
What do you mean by "some patterns"?
What do you mean by "worse" (in terms of the residuals)?
It is indeed the case that if you use family=negative.binomial
(from the MASS package) that you need to specify theta. You could
try running GEE fits in a loop or an optimizer with a range of theta values and
selecting the one that maximizes some goodness-of-fit statistic
(this is what MASS::glm.nb does).
I would suggest looking into Zuur et al's book on mixed models
in ecology to see if there is anything useful there.
Ben Bolker
More information about the R-help
mailing list