Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Negative binomial in GEE

Tags:

r

For R packages implementing GEE such as gee, geepack, it seems that the negative binomial family is not included. I have two questions:

  1. Are there any other R packages for GEE that I am not aware of?

  2. 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?

like image 579
alittleboy Avatar asked Dec 19 '12 06:12

alittleboy


People also ask

What is a negative binomial 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.

What is negative binomial used for?

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.

How do you interpret a negative binomial?

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 ...

Can a negative binomial model be Overdispersed?

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.


1 Answers

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).

like image 92
Ben Bolker Avatar answered Oct 02 '22 22:10

Ben Bolker