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. Thanks -- View this message in context: http://r.789695.n4.nabble.com/Neg-Binomial-In-GEE-tp3627924p3627924.html Sent from the R help mailing list archive at Nabble.com.
Neg Binomial In GEE
4 messages · SamiC, Ben Bolker
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
Thanks, I have been using zuurs book but it only goes as far as poisson and binomial GEE's. Initially I fitted a glm with poisson and this was over dispersed. Then moved to binomial, but residual patterns are not great (ie variance). Looks like some spatial correlation. However, in the GEE with poisson it looks like i am stil having issues with over dispersion. Also I am getting convergence errors once I have built the model so far. Not sure what to do with this either as I have all ready reduced variables as much as possible and still havent finished model selection (ie. with AIC and anova test). Thanks -- View this message in context: http://r.789695.n4.nabble.com/Neg-Binomial-In-GEE-tp3627924p3628613.html Sent from the R help mailing list archive at Nabble.com.
SamiC <s.cox.10 <at> aberdeen.ac.uk> writes:
I have been using zuurs book but it only goes as far as poisson and binomial GEE's. Initially I fitted a glm with poisson and this was over dispersed. Then moved to binomial, but residual patterns are not great (ie variance). Looks like some spatial correlation. However, in the GEE with poisson it looks like i am stil having issues with over dispersion.
How about using family=quasibinomial? It has a different variance structure from NB (var = phi*mu rather than var = mu*(1+phi*mu), and NB is sometimes preferred because it has a slightly stronger foundation -- the NB parameterized as mu*(1+phi*mu) is in the exponential family if phi is fixed -- but this is not so important if you are using GEE anyway.
Also I am getting convergence errors once I have built the model so far. Not sure what to do with this either as I have all ready reduced variables as much as possible and still havent finished model selection (ie. with AIC and anova test).
Well, if you have reduced the variables "as much as possible" you may simply have a problem with not enough/poor quality data. Sometimes that happens and you just have to simplify your model more than you would like. Remember that if you are going to do model selection (throwing away variables on the basis of some form of model goodness-of-fit) then you should *not* make inferences on the basis of the parameters in the selected model -- e.g. see Harrell's _Regression Modeling Strategies_. Ben Bolker