[R] Negative Binomial Regression

jcarmichael jcarmichael314 at gmail.com
Mon Jul 28 20:34:24 CEST 2008


Hello.

I am attempting to duplicate a negative binomial regression in R.  SAS uses
generalized estimating equations for model fitting in the GENMOD procedure.

proc genmod data=mydata (where=(gender='F')); 
by agegroup;
class id gender type;
model count = var1 var2 var3 /dist=NB link=log offset=lregtm;
repeated subject=id /type=exch;  
run;

Since my dataset has several observations for each subject, I need the
REPEATED statement in order to indicate dependence among observations with
the same subject ID and independence amongst those with distinct subject
IDs.  The TYPE statement goes on to specify the structure of the correlation
matrix to be used (exchangeable in this case).

I've been experimenting with a few of the packages capable of producing a
glm for a binomial distribution, but have yet to find one that will allow me
to recreate the SAS analysis.  What I would ultimately like to have are the
coefficients (and p-values) associated with each of the variables in my
model.

Any help or guidance on this would be appreciated.  Thank you!

J.
-- 
View this message in context: http://www.nabble.com/Negative-Binomial-Regression-tp18696667p18696667.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list