Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str11 proc_type float(re_op postop_month_reop diagnosis severity) "trab" 0 3.766666 . . "tube" 1 2.7 . . "trab" 0 41.03333 . 2 "tube" 0 176.16667 . 2 "tube" 1 109.9 . 3 "trab" 0 3.23333 . 3 "trab" 0 20.06667 . . "tube" 0 26.766666 6 3 "trab" 1 95.96667 . . "trab" 0 65.833336 . . "tube" 0 178.1 . . "tube" 0 13.633333 6 3 "tube" 0 3.766667 . . "tube" 0 10.7 . 3 "trab" 0 3.76667 . 3 "tube" 0 23.1 6 . "trab" 0 33.666668 . . "trab" 0 14.6 . . "trab" 0 16.766666 . . "trab" 0 3.9 . . "tube" 0 36.6 . . "tube" 0 16.333334 2 3 "trab" 0 9.8 . . "tube" 0 19.7 6 3 "trab" 0 80 . 1 "trab" 0 89.16666 . 3 "trab" 1 78.13333 . 3 "trab" 1 4.7 . 3 "trab" 0 15.9 . . "trab" 0 9.5 . . "tube" 0 30.9 . 3 "trab" 0 7.666667 2 3 "tube" 1 17.466667 1 . "trab" 0 23.9 3 3 "tube" 0 4 2 3 "tube" 0 55.066666 . . "tube" 1 16.8 . . "trab" 0 33.46667 . . "tube" 0 36.633335 . . "trab" 0 121.63333 . 2 "tube" 0 27.366667 6 1 "tube" 0 27.6 6 1 "trab" 0 28.2 5 3 "tube" 0 64.7 5 . "trab" 0 12.033334 4 3 "tube" 0 15.633333 . 3 "trab" 0 44.56667 . . "trab" 0 56.3 . . "trab" 0 .26667 . . "trab" 0 54.56667 2 . "trab" 0 53.33333 . 2 "trab" 0 22.233334 2 3 "tube" 0 50.26667 . . "tube" 0 69.96667 6 . "trab" 0 116.66666 . . "trab" 0 41.96667 . 2 "tube" 0 77.5 . 3 "trab" 0 106.76667 . . "tube" 0 9.466666 6 2 "trab" 0 7 2 3 "tube" 0 60.5 . . "trab" 1 78.16666 . . "tube" 0 5.666667 . . "tube" 0 34.866665 . . "trab" 0 72.1 . . "trab" 0 73.03333 . . "tube" 1 .26666668 . . "trab" 0 16.566667 5 3 "trab" 1 18.46667 . . "tube" 0 77.233333 . . "tube" 1 2.76667 . . "tube" 0 90 . . "trab" 0 13.46667 2 . "tube" 0 7.733334 1 . "tube" 0 6.53333 1 . "tube" 0 99.866667 6 3 "trab" 0 31.866667 . . "trab" 0 9.066667 . . "tube" 0 28.233334 . 3 "tube" 0 107.13333 . . "tube" 0 62.76667 . . "tube" 0 25.2 2 . "trab" 0 141.1 . 3 "tube" 0 60.46667 . 3 "trab" 0 13 . . "trab" 1 38.5 . . "trab" 0 4.6 . 3 "trab" 1 52.73333 . . "trab" 1 28.233334 . . "trab" 0 42.9 3 1 "trab" 0 45.3 . 1 "tube" 1 .033333335 6 3 "trab" 0 53.46667 . 3 "trab" 0 66.86667 2 . "tube" 0 3.63334 6 . "trab" 0 40.13333 . 3 "tube" 0 115.53333 2 . "tube" 0 31.06667 . . "trab" 0 1.866667 . 3 "tube" 1 4 2 3 end
code:
stset postop_month, failure(re_op) exit(time 36)
generate procedure_type=1 if proc_type=="trab"
replace procedure_type=2 if proc_type=="tube"
stcox i.procedure_type i.diagnosis i.severity
Code:
stcox i.procedure_type i.diagnosis i.severity failure _d: re_op analysis time _t: postop_month_reop exit on or before: time 36 Iteration 0: log likelihood = -5.8348107 Iteration 1: log likelihood = -4.3840398 Iteration 2: log likelihood = -4.075028 Iteration 3: log likelihood = -4.015207 Iteration 4: log likelihood = -3.9966115 Iteration 5: log likelihood = -3.9898231 Iteration 6: log likelihood = -3.9873317 Iteration 7: log likelihood = -3.986416 Iteration 8: log likelihood = -3.9860792 Iteration 9: log likelihood = -3.9859553 Iteration 10: log likelihood = -3.9859098 Iteration 11: log likelihood = -3.985893 Iteration 12: log likelihood = -3.9858868 Iteration 13: log likelihood = -3.9858846 Iteration 14: log likelihood = -3.9858837 Iteration 15: log likelihood = -3.9858834 Iteration 16: log likelihood = -3.9858833 Iteration 17: log likelihood = -3.9858833 Iteration 18: log likelihood = -3.9858832 Iteration 19: log likelihood = -3.9858832 Iteration 20: log likelihood = -3.9858832 Iteration 21: log likelihood = -3.9858832 Iteration 22: log likelihood = -3.9858832 Iteration 23: log likelihood = -3.9858832 Iteration 24: log likelihood = -3.9858832 Iteration 25: log likelihood = -3.9858832 Iteration 26: log likelihood = -3.9858832 Iteration 27: log likelihood = -3.9858832 Iteration 28: log likelihood = -3.9858832 Iteration 29: log likelihood = -3.9858832 Iteration 30: log likelihood = -3.9858832 Iteration 31: log likelihood = -3.9858832 Iteration 32: log likelihood = -3.9858832 Iteration 33: log likelihood = -3.9858832 Refining estimates: Iteration 0: log likelihood = -3.9858832 Iteration 1: log likelihood = -3.9858832 Iteration 2: log likelihood = -3.9858832 Cox regression -- no ties No. of subjects = 19 Number of obs = 19 No. of failures = 2 Time at risk = 338.5000034 LR chi2(5) = 3.70 Log likelihood = -3.9858832 Prob > chi2 = 0.5937 ---------------------------------------------------------------------------------- _t | Haz. Ratio Std. Err. z P>|z| [95% Conf. Interval] -----------------+---------------------------------------------------------------- 2.procedure_type | 2.49e+17 4.47e+25 0.00 1.000 0 . | diagnosis | 3 | 60.43064 . . . . . 4 | 19.9061 5.25e+09 0.00 1.000 0 . 5 | 19.9061 4.49e+09 0.00 1.000 0 . 6 | .6708204 .9501599 -0.28 0.778 .0417784 10.77111 | severity | 2 | 23.28885 4.51e+09 0.00 1.000 0 . 3 | 1.96e+17 . . . . . ----------------------------------------------------------------------------------
Code:
stcox i.procedure_type i.diagnosis failure _d: re_op analysis time _t: postop_month_reop exit on or before: time 36 Iteration 0: log likelihood = -9.6344964 Iteration 1: log likelihood = -8.5303892 Iteration 2: log likelihood = -7.64667 Iteration 3: log likelihood = -7.5746907 Iteration 4: log likelihood = -7.5582573 Iteration 5: log likelihood = -7.5522466 Iteration 6: log likelihood = -7.5500349 Iteration 7: log likelihood = -7.5492213 Iteration 8: log likelihood = -7.5489219 Iteration 9: log likelihood = -7.5488118 Iteration 10: log likelihood = -7.5487713 Iteration 11: log likelihood = -7.5487564 Iteration 12: log likelihood = -7.5487509 Iteration 13: log likelihood = -7.5487489 Iteration 14: log likelihood = -7.5487482 Iteration 15: log likelihood = -7.5487479 Iteration 16: log likelihood = -7.5487478 Iteration 17: log likelihood = -7.5487477 Iteration 18: log likelihood = -7.5487477 Iteration 19: log likelihood = -7.5487477 Iteration 20: log likelihood = -7.5487477 Iteration 21: log likelihood = -7.5487477 Iteration 22: log likelihood = -7.5487477 Iteration 23: log likelihood = -7.5487477 Iteration 24: log likelihood = -7.5487477 Iteration 25: log likelihood = -7.5487477 Iteration 26: log likelihood = -7.5487477 Iteration 27: log likelihood = -7.5487477 Iteration 28: log likelihood = -7.5487477 Iteration 29: log likelihood = -7.5487477 Iteration 30: log likelihood = -7.5487477 Iteration 31: log likelihood = -7.5487477 Iteration 32: log likelihood = -7.5487477 Iteration 33: log likelihood = -7.5487477 Iteration 34: log likelihood = -7.5487477 Iteration 35: log likelihood = -7.5487477 Refining estimates: Iteration 0: log likelihood = -7.5487477 Iteration 1: log likelihood = -7.5487477 Cox regression -- no ties No. of subjects = 31 Number of obs = 31 No. of failures = 3 Time at risk = 615.6333456 LR chi2(6) = 4.17 Log likelihood = -7.5487477 Prob > chi2 = 0.6535 ---------------------------------------------------------------------------------- _t | Haz. Ratio Std. Err. z P>|z| [95% Conf. Interval] -----------------+---------------------------------------------------------------- 2.procedure_type | 7.78e+15 5.49e+23 0.00 1.000 0 . | diagnosis | 2 | .5697548 .8061791 -0.40 0.691 .0355855 9.12226 3 | .1304417 3.29e+07 -0.00 1.000 0 . 4 | .1337592 6.59e+07 -0.00 1.000 0 . 5 | 7.48e-17 1.21e-08 -0.00 1.000 0 . 6 | .2325807 .3325712 -1.02 0.308 .0141067 3.834616 ----------------------------------------------------------------------------------
0 Response to Problem with stcox hazard model
Post a Comment