For R packages implementing GEE such as gee
, geepack
, it seems that the negative binomial family is not included. I have two questions:
Are there any other R packages for GEE that I am not aware of?
If not, is there a simple step to allow the creation of a family, i.e providing the link function (log mu
) and the variance function (mu + mu^2/theta
), assuming theta
is specified (otherwise the NB is not a GLM) and then to let the gee
or geepack
codes do the business in a similar fashion to glm
?
Negative binomial regression is a generalization of Poisson regression which loosens the restrictive assumption that the variance is equal to the mean made by the Poisson model.
The negative binomial distribution is commonly used to describe the distribution of count data, such as the numbers of parasites in blood specimens, where that distribution is aggregated or contagious.
We can interpret the negative binomial regression coefficient as follows: for a one unit change in the predictor variable, the difference in the logs of expected counts of the response variable is expected to change by the respective regression coefficient, given the other predictor variables in the model are held ...
Well, if your data follows some negative binomial distribution, but there are too many zeros ("zero-inflated negative binomial") it could be said to be overdispersed relative to a negative binomial distribution.
You should be able to use the negative.binomial
family defined in the MASS
package to do this (set up a NB family with a specified theta value). It looks like geepack::geese
(at least) will accept family specifications in this form. To estimate theta you might try embedding the GEE fit with a fixed theta into a loop, or make a geefit_NB(theta)
function and optimize over theta
.
If negative.binomial
did not already exist in MASS
, you could define your own family (this is admittedly a bit advanced -- I would start by downloading the source code of the MASS
package and looking at the file R/neg.bin.R
).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With