----------------------------------------------------------------------------------------------------------- name: log: /Users/jdignam/Desktop/tam_analysis.log log type: text opened on: 29 Nov 2015, 17:21:58 . * answers for problem 3, HW 6 . tab recur trt, row col chi2 +-------------------+ | Key | |-------------------| | frequency | | row percentage | | column percentage | +-------------------+ | trt recur | 1 2 | Total -----------+----------------------+---------- 0 | 358 408 | 766 | 46.74 53.26 | 100.00 | 68.58 78.46 | 73.51 -----------+----------------------+---------- 1 | 164 112 | 276 | 59.42 40.58 | 100.00 | 31.42 21.54 | 26.49 -----------+----------------------+---------- Total | 522 520 | 1,042 | 50.10 49.90 | 100.00 | 100.00 100.00 | 100.00 Pearson chi2(1) = 13.0570 Pr = 0.000 . display 358*112/(164*408) .59923482 . logistic recur trt, or Logistic regression Number of obs = 1,042 LR chi2(1) = 13.12 Prob > chi2 = 0.0003 Log likelihood = -595.81568 Pseudo R2 = 0.0109 ------------------------------------------------------------------------------ recur | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- trt | .5992348 .0853156 -3.60 0.000 .4533232 .7921112 _cons | .7644759 .1656339 -1.24 0.215 .4999651 1.168928 ------------------------------------------------------------------------------ . * tamoxifn is associated with a 40\% reduction in recurrence odds . . * result is statistically significant, p < 0.001 . . tab dead trt, row col chi2 +-------------------+ | Key | |-------------------| | frequency | | row percentage | | column percentage | +-------------------+ | trt dead | 1 2 | Total -----------+----------------------+---------- 0 | 337 368 | 705 | 47.80 52.20 | 100.00 | 64.56 70.77 | 67.66 -----------+----------------------+---------- 1 | 185 152 | 337 | 54.90 45.10 | 100.00 | 35.44 29.23 | 32.34 -----------+----------------------+---------- Total | 522 520 | 1,042 | 50.10 49.90 | 100.00 | 100.00 100.00 | 100.00 Pearson chi2(1) = 4.5908 Pr = 0.032 . display (337*152)/ (185*368) .75240893 . logistic dead trt, or Logistic regression Number of obs = 1,042 LR chi2(1) = 4.60 Prob > chi2 = 0.0320 Log likelihood = -653.55533 Pseudo R2 = 0.0035 ------------------------------------------------------------------------------ dead | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- trt | .7524089 .1000141 -2.14 0.032 .5798395 .9763377 _cons | .7296051 .1509197 -1.52 0.127 .486425 1.094359 ------------------------------------------------------------------------------ . * tam assocaited with 25\% reduction in odds of death, statistically significant at p < 0.05 . logistic recur trt age bmi tumsiz Logistic regression Number of obs = 1,042 LR chi2(4) = 37.42 Prob > chi2 = 0.0000 Log likelihood = -583.66651 Pseudo R2 = 0.0311 ------------------------------------------------------------------------------ recur | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- trt | .6077191 .0876392 -3.45 0.001 .4580902 .8062221 age | .9744114 .007044 -3.59 0.000 .9607027 .9883156 bmi | 1.020568 .0134689 1.54 0.123 .994508 1.047311 tumsiz | 1.018924 .0062295 3.07 0.002 1.006787 1.031207 _cons | 1.147386 .5929763 0.27 0.790 .4166808 3.159482 ------------------------------------------------------------------------------ . * 3\% reduction in odds of failure per year of age, ~2\% increase per mm of tumor size, BMI borderline ef > fect NS . * trt effect about the same . . tab endo trt, row col chi2 +-------------------+ | Key | |-------------------| | frequency | | row percentage | | column percentage | +-------------------+ | trt endo | 1 2 | Total -----------+----------------------+---------- 0 | 519 509 | 1,028 | 50.49 49.51 | 100.00 | 99.43 97.88 | 98.66 -----------+----------------------+---------- 1 | 3 11 | 14 | 21.43 78.57 | 100.00 | 0.57 2.12 | 1.34 -----------+----------------------+---------- Total | 522 520 | 1,042 | 50.10 49.90 | 100.00 | 100.00 100.00 | 100.00 Pearson chi2(1) = 4.6649 Pr = 0.031 . logistic endo trt Logistic regression Number of obs = 1,042 LR chi2(1) = 4.95 Prob > chi2 = 0.0260 Log likelihood = -71.766622 Pseudo R2 = 0.0334 ------------------------------------------------------------------------------ endo | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- trt | 3.738703 2.446306 2.02 0.044 1.036963 13.47965 _cons | .0015461 .0018514 -5.40 0.000 .0001479 .0161627 ------------------------------------------------------------------------------ . * 3.7-fold excess risk, statistically significant at p < 0.05. However, total cases are 14/1042 or 1.3\% > of patients. This event is much less common that breast cancer recurrence (26\5 of patients) . tab endo trt, row col chi2 +-------------------+ | Key | |-------------------| | frequency | | row percentage | | column percentage | +-------------------+ | trt endo | 1 2 | Total -----------+----------------------+---------- 0 | 519 509 | 1,028 | 50.49 49.51 | 100.00 | 99.43 97.88 | 98.66 -----------+----------------------+---------- 1 | 3 11 | 14 | 21.43 78.57 | 100.00 | 0.57 2.12 | 1.34 -----------+----------------------+---------- Total | 522 520 | 1,042 | 50.10 49.90 | 100.00 | 100.00 100.00 | 100.00 Pearson chi2(1) = 4.6649 Pr = 0.031 . display 519*11/3*509 968627 . display 519*11/(3*509) 3.7387033 . reg age bmi Source | SS df MS Number of obs = 1,042 -------------+---------------------------------- F(1, 1040) = 41.26 Model | 3949.97577 1 3949.97577 Prob > F = 0.0000 Residual | 99553.2267 1,040 95.7242565 R-squared = 0.0382 -------------+---------------------------------- Adj R-squared = 0.0372 Total | 103503.202 1,041 99.4267075 Root MSE = 9.7839 ------------------------------------------------------------------------------ age | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- bmi | .3591978 .0559175 6.42 0.000 .2494739 .4689218 _cons | 45.31786 1.493655 30.34 0.000 42.38694 48.24878 ------------------------------------------------------------------------------ . gen bmi = bmi/10 variable bmi already defined r(110); . gen bmismall = bmi/10 . reg age bmismall Source | SS df MS Number of obs = 1,042 -------------+---------------------------------- F(1, 1040) = 41.26 Model | 3949.97588 1 3949.97588 Prob > F = 0.0000 Residual | 99553.2266 1,040 95.7242564 R-squared = 0.0382 -------------+---------------------------------- Adj R-squared = 0.0372 Total | 103503.202 1,041 99.4267075 Root MSE = 9.7839 ------------------------------------------------------------------------------ age | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- bmismall | 3.591978 .5591747 6.42 0.000 2.494739 4.689218 _cons | 45.31786 1.493655 30.34 0.000 42.38694 48.24878 ------------------------------------------------------------------------------ . help impute . exit, clear