/* Hypothesis test for increasing odds ratio - logistic 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;

ods listing select responseprofile parameterestimates oddsratios ;

proc logistic data=t01;
model diabetes(event='1')=age ;
run;

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

                            The LOGISTIC Procedure

                                Response Profile

                     Ordered                          Total
                       Value     diabetes         Frequency

                           1     0                       43
                           2     1                       17

                      Probability modeled is diabetes='1'.


                   Analysis of Maximum Likelihood Estimates

                                     Standard          Wald
      Parameter    DF    Estimate       Error    Chi-Square    Pr > ChiSq

      Intercept     1      0.5145      0.9916        0.2692        0.6038
      age           1     -0.0317      0.0214        2.1895        0.1390a


                              Odds Ratio Estimates

                                Point          95% Wald
                   Effect    Estimate      Confidence Limits

                   age        0.969b      0.929       1.010c
            
        
a P-value indicating no significant association of age with diabetes
b Estimated odds ratio of diabetes per year increase of age
c 95% confidence interval for the odds ratio per year increase of age