I think the coefficients are different because of your use of the exposure() options. If you run the following example you will find that the SAS and Stata coefficients are exactly the same. data ships; input ship time yr_con yr_op service accident op co_65_69 co_70_74 co_75_79 weight; int=1; cards; 1 1 1 1 127 0 0 0 0 0 3 1 2 1 2 63 0 1 0 0 0 4 1 3 2 1 1095 3 0 1 0 0 4 1 4 2 2 1095 4 1 1 0 0 3 1 5 3 1 1512 6 0 0 1 0 6 1 6 3 2 3353 18 1 0 1 0 7 1 7 4 1 . . 0 0 0 1 8 1 8 4 2 2244 11 1 0 0 1 7 2 1 1 1 44882 39 0 0 0 0 4 2 2 1 2 17176 29 1 0 0 0 5 2 3 2 1 28609 58 0 1 0 0 3 2 4 2 2 20370 53 1 1 0 0 2 2 5 3 1 7064 12 0 0 1 0 3 2 6 3 2 13099 44 1 0 1 0 4 2 7 4 1 . . 0 0 0 1 6 2 8 4 2 7117 18 1 0 0 1 5 3 1 1 1 1179 1 0 0 0 0 4 3 2 1 2 552 1 1 0 0 0 3 3 3 2 1 781 0 0 1 0 0 2 3 4 2 2 676 1 1 1 0 0 1 3 5 3 1 783 6 0 0 1 0 3 3 6 3 2 1948 2 1 0 1 0 4 3 7 4 1 . . 0 0 0 1 5 3 8 4 2 274 1 1 0 0 1 3 4 1 1 1 251 0 0 0 0 0 2 4 2 1 2 105 0 1 0 0 0 1 4 3 2 1 288 0 0 1 0 0 5 4 4 2 2 192 0 1 1 0 0 5 4 5 3 1 349 2 0 0 1 0 4 4 6 3 2 1208 11 1 0 1 0 3 4 7 4 1 . . 0 0 0 1 2 4 8 4 2 2051 4 1 0 0 1 4 5 1 1 1 45 0 0 0 0 0 5 5 2 1 2 . . 1 0 0 0 6 5 3 2 1 789 7 0 1 0 0 7 5 4 2 2 437 7 1 1 0 0 8 5 5 3 1 1157 5 0 0 1 0 9 5 6 3 2 2161 12 1 0 1 0 6 5 7 4 1 . . 0 0 0 1 4 5 8 4 2 542 1 1 0 0 1 3 ; data two; set ships; lnservice = log(service); run; proc countreg data=two dist=poisson groupid=ship; model accident=op co_65_69 co_70_74 co_75_79/ errorcomp=fixed offset=lnservice; run; proc countreg data=two dist=negbin groupid=ship; model accident=op co_65_69 co_70_74 co_75_79/ errorcomp=fixed offset=lnservice; run; *poisson with RE and no exposure(service) option; proc countreg data=two dist=poisson groupid=ship; model accident=op co_65_69 co_70_74 co_75_79/ errorcomp=random /*offset=lnservice*/; run; *Poisson with RE and exposure(service); proc countreg data=two dist=poisson groupid=ship ; model accident=op co_65_69 co_70_74 co_75_79/ errorcomp=random offset=lnservice; run; proc export data=two outfile="C:\Public\two.dta"; run; /*open stata and run this use "C:\Public\two.dta", clear xtset ship *coefficients match the "Poisson with RE and no exposure(service) option" exactly xtpoisson accident op co_65_69 co_70_74 co_75_79, re estimates store re *coefficients matches the "Poisson with RE and exposure(service)" exactly xtpoisson accident op co_65_69 co_70_74 co_75_79, exposure(service) re estimates store re_wos outreg2 [re re_wos] using compare, addstat(log-like, `e(ll)')
... View more