--------------------------------------------------------------------------------------- name: log: C:\MyDocs\MPH\LectureNotes\ClassDoLogData\Poisson\8.7.Framingham.log log type: text opened on: 22 Jan 2010, 16:12:21 . * 8.7.Framingham.log . * . * Simple Poisson regression analysis of the effect of gender on . * coronary heart disease in the Framingham Heart Study. . * . use 2.20.Framingham.dta, clear . gen male = sex==1 . gen per_yrs = followup/365.25 . table male, contents(sum chdfate sum per_yrs) -------------------------------------- male | sum(chdfate) sum(per_yrs) ----------+--------------------------- 0 | 650 61451.17 1 | 823 42258.92 -------------------------------------- . glm chdfate male , family(poisson) link(log) lnoffset(per_yrs) Iteration 0: log likelihood = -4240.3694 Iteration 1: log likelihood = -3906.885 Iteration 2: log likelihood = -3906.5506 Iteration 3: log likelihood = -3906.5505 Generalized linear models No. of obs = 4699 Optimization : ML Residual df = 4697 Scale parameter = 1 Deviance = 4867.101078 (1/df) Deviance = 1.036215 Pearson = 12820.44155 (1/df) Pearson = 2.729496 Variance function: V(u) = u [Poisson] Link function : g(u) = ln(u) [Log] AIC = 1.663567 Log likelihood = -3906.550539 BIC = -34846.53 ------------------------------------------------------------------------------ | OIM chdfate | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- male | .6104111 .0524741 11.63 0.000 .5075638 .7132584 _cons | -4.549026 .0392232 -115.98 0.000 -4.625902 -4.47215 per_yrs | (exposure) --Break-- r(1); end of do-file --Break-- r(1); . table male, contents(sum chdfate sum per_yrs ) -------------------------------------- male | sum(chdfate) sum(per_yrs) ----------+--------------------------- 0 | 650 61451.17 1 | 823 42258.92 -------------------------------------- . exit, clear