------------------------------------------------------------------------------------- name: log: C:\MyDocs\MPH\LectureNotes\ClassDoLogData\logistic regression\5.11.1.Eso > phagealCa.ClassVersion.log log type: text opened on: 13 Jan 2010, 21:45:15 . * 5.11.1.EsophagealCa.ClassVersion.log . * . * Estimate age-adjusted risk of esophageal cancer due to dose of alcohol. . * . use 5.5.EsophagealCa.dta, clear . * . * Show frequency tables of effect of dose of alcohol on esophageal cancer. . * . tabulate cancer alcohol [freq=patients] , column +-------------------+ | Key | |-------------------| | frequency | | column percentage | +-------------------+ Esophageal | Alcohol (gm/day) Cancer | 0-39 40-79 80-119 >= 120 | Total -----------+--------------------------------------------+---------- No | 386 280 87 22 | 775 | 93.01 78.87 63.04 32.84 | 79.49 -----------+--------------------------------------------+---------- Yes | 29 75 51 45 | 200 | 6.99 21.13 36.96 67.16 | 20.51 -----------+--------------------------------------------+---------- Total | 415 355 138 67 | 975 | 100.00 100.00 100.00 100.00 | 100.00 . * . * Analyze the Ille-et-Vilaine data using logistic regression model (5.24) . * . logit cancer i.age i.alcohol [freq=patients] Iteration 0: log likelihood = -494.74421 Iteration 1: log likelihood = -384.42505 Iteration 2: log likelihood = -365.53019 Iteration 3: log likelihood = -363.75616 Iteration 4: log likelihood = -363.70811 Iteration 5: log likelihood = -363.70808 Logistic regression Number of obs = 975 LR chi2(8) = 262.07 Prob > chi2 = 0.0000 Log likelihood = -363.70808 Pseudo R2 = 0.2649 ------------------------------------------------------------------------------ cancer | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- age | 2 | 1.631112 1.080013 1.51 0.131 -.4856742 3.747899 3 | 3.425834 1.038937 3.30 0.001 1.389555 5.462114 4 | 3.943447 1.034622 3.81 0.000 1.915624 5.971269 5 | 4.356767 1.041336 4.18 0.000 2.315786 6.397747 6 | 4.424219 1.0914 4.05 0.000 2.285115 6.563324 | alcohol | 2 | 1.43431 .2447858 5.86 0.000 .9545384 1.914081 3 | 2.00711 .2776153 7.23 0.000 1.462994 2.551226 4 | 3.680012 .3763372 9.78 0.000 2.942405 4.417619 | _cons | -6.147181 1.041877 -5.90 0.000 -8.189223 -4.10514 ------------------------------------------------------------------------------ . lincom 3.alcohol - 2.alcohol,or ( 1) - [cancer]2.alcohol + [cancer]3.alcohol = 0 ------------------------------------------------------------------------------ cancer | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 1.773226 .4159625 2.44 0.015 1.119669 2.808268 ------------------------------------------------------------------------------ . lincom 4.alcohol - 3.alcohol,or ( 1) - [cancer]3.alcohol + [cancer]4.alcohol = 0 ------------------------------------------------------------------------------ cancer | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- (1) | 5.327605 1.951761 4.57 0.000 2.598337 10.92367 ------------------------------------------------------------------------------ . logistic cancer i.age i.alcohol [freq=patients] Logistic regression Number of obs = 975 LR chi2(8) = 262.07 Prob > chi2 = 0.0000 Log likelihood = -363.70808 Pseudo R2 = 0.2649 ------------------------------------------------------------------------------ cancer | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- age | 2 | 5.109555 5.518386 1.51 0.131 .6152822 42.43183 3 | 30.74829 31.94554 3.30 0.001 4.013065 235.5949 4 | 51.59613 53.3825 3.81 0.000 6.791178 392.0027 5 | 78.00451 81.22889 4.18 0.000 10.13289 600.4908 6 | 83.44761 91.07472 4.05 0.000 9.826812 708.623 | alcohol | 2 | 4.196747 1.027304 5.86 0.000 2.597471 6.780704 3 | 7.441782 2.065953 7.23 0.000 4.318873 12.82282 4 | 39.64687 14.92059 9.78 0.000 18.96139 82.8987 ------------------------------------------------------------------------------ . log close name: log: C:\MyDocs\MPH\LectureNotes\ClassDoLogData\logistic regression\5.11.1.Eso > phagealCa.ClassVersion.log log type: text closed on: 13 Jan 2010, 21:45:19 -------------------------------------------------------------------------------------