when I use the following codes, it doesn't show the NB dispersion.
proc genmod data=crash ; class ID year;
model accident = major minor / dist=negbin link=log
type3 wald; Repeated Subject= ID;
but when I delete " type3 wald; Repeated Subject= ID" it shows dispersion. How can I have estimated dispersion in type 3 repeated procedure.
That seems very odd. Have you submitted this to SAS tech support?
You could try the glimmix procedure for fitting a GEE using ML estimators instead of moment estimators of the working correlation structure. Glimmix code that fits the same model as your genmod code would be:
proc glimmix data=crash empirical=hc0;
class ID year;
model accident = major minor / dist=negbin link=log;
random _residual_ / subject=ID;
The glimmix procedure will produce type3 Wald tests by default, so you do not need to specify any additional options to obtain these statistics. The empirical=hc0 option requests traditional sandwich standard errors. Note that the glimmix procedure offers other methods for computing robust standard errors - improvements on the traditional sandwich estimates. You might want to use empirical=hc3. See the following manuscripts regarding sandwich estimates: