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

filename t01 url 'http://hedwig.mgh.harvard.edu/biostatistics/sites/default/files/public/education/tmp_sample_data.csv';

proc import file=t01 out=t01 dbms=csv replace;
run;

proc phreg data=t01;
model recurr_day*recurrence(0)=age;
run;

/********************************** ANNOTATED RESULTS **********************************/

                              The PHREG Procedure

                               Model Information

                      Data Set                 WORK.T01
                      Dependent Variable       recurr_day
                      Censoring Variable       recurrence
                      Censoring Value(s)       0
                      Ties Handling            BRESLOW


                    Number of Observations Read          60
                    Number of Observations Used          60


               Summary of the Number of Event and Censored Values

                                                       Percent
                     Total       Event    Censored    Censored

                        60          12          48       80.00


                               Convergence Status

                 Convergence criterion (GCONV=1E-8) satisfied.


                             Model Fit Statistics

                                     Without           With
                    Criterion     Covariates     Covariates

                    -2 LOG L          68.948         68.239
                    AIC               68.948         70.239
                    SBC               68.948         70.723


                    Testing Global Null Hypothesis: BETA=0

            Test                 Chi-Square       DF     Pr > ChiSq

            Likelihood Ratio         0.7090        1         0.3998
            Score                    0.7234        1         0.3950
            Wald                     0.7140        1         0.3981


                   Analysis of Maximum Likelihood Estimates

                   Parameter     Standard                               Hazard
 Parameter   DF     Estimate        Error   Chi-Square   Pr > ChiSq      Ratio

 age          1     -0.01894      0.02241       0.7140       0.3981a    0.981b
            
        
a P-value indicating hazard not significantly associated with age
b Hazard ratio per year increase in age