jcarmichael <jcarmichael314 <at> gmail.com> writes:

> 
> 
> 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 would try glmmPQL in the MASS package.  I don't think you
can *quite* get negative binomial regression this way, but
you can definitely get a quasipoisson model.  I think exchangeable
correlation corresponds to correlation=corCompSymm() in your
glmmPQL command.

  Ben Bolker

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to