***************************************************************
*                                                             *
*   Hypothesis test for increasing hazard - Cox regression    *
*                                                             *
*                                                             *
***************************************************************


insheet using  http://hedwig.mgh.harvard.edu/biostatistics/sites/default/files/public/education/tmp_sample_data.csv

stset recurr_day, failure(recurrence==1)
stcox age


********************************** ANNOTATED RESULTS **********************************

         failure _d:  recurrence == 1
   analysis time _t:  recurr_day

Iteration 0:   log likelihood = -34.473785
Iteration 1:   log likelihood = -34.119525
Iteration 2:   log likelihood = -34.119261
Refining estimates:
Iteration 0:   log likelihood = -34.119261

Cox regression -- Breslow method for ties

No. of subjects =           60                     Number of obs   =        60
No. of failures =           12
Time at risk    =        10528
                                                   LR chi2(1)      =      0.71
Log likelihood  =   -34.119261                     Prob > chi2     =    0.3998

------------------------------------------------------------------------------
          _t | Haz. Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         age |   .9812394   .0219927    -0.84   0.398     .9390676    1.025305
------------------------------------------------------------------------------