Programming the statistical procedures from SAS

hazard ratio

Reply
Contributor
Posts: 20

hazard ratio

Hello,

In proc phreg, what is the meaning of the hazard ratio when there are 3 groups being compared(groups 1,2,and 3)? Also, is there a way to generate the hazard ratio and confidence intervals using proc lifetest?

Thanks in advance.

Super User
Posts: 18,569

hazard ratio

Similar to a logistic regression with multiple categories, the hazard ratio is for the different levels compared. ie everything else held constant, 2 vs 1 and 3 vs 1 assuming 1 is your reference level.  You can set what you want the reference level in your class statement.

class group (param=REF REF='1');

This sets the reference level to 1. You can change that to 3 if you'd like. 

I suggest using the hazardratio line to get the specific hazardratios you need ie

hazardratio group;

You cannot get hazard ratio's from PROC LIFETEST because it is not part of the model. PROC LIFETEST by default uses a KM method of estimating survival which is non-parameteric and has no assumptions, ie proportional hazards.  Comparison of the two groups is done via the LOG-RANK test instead.

Contributor
Posts: 20

hazard ratio

Thank you for your response.

I ran the code with your suggestion.  I've pasted the output below.  Number 1. is without the class and hazard ratio code and 2. includes the code.  3. includes the phreg with only groups 1 and 2.

What I am trying to understand is

A.   how to interpret when SAS gives me one hazard ratio as in 1, i.e.  the hazard ration =.58.  Is this hazard ratio interpretable? How is it described?

B.  In the 2nd output, the hazard ratios come out different ?

and C.  in the 3rd output when I just run the model with groups 1 and 2 - I get a different hazards ratio. (0.741).  Shouldn't this be the same as the Group 2 ratio in the 2nd output?

Thanks again for all your help.

1.   Output Without the

*class group (param=REF REF='1');

*hazardratio group;

                            Analysis of Maximum Likelihood Estimates

                   Parameter    Standard                            Hazard   95% Hazard Ratio

   Parameter  DF    Estimate       Error  Chi-Square  Pr > ChiSq     Ratio   Confidence Limits

   group       1    -0.54509     0.32305      2.8471      0.0915     0.580     0.308     1.092

2.  Output with

class group (param=REF REF='1');

hazardratio group;

                          Analysis of Maximum Likelihood Estimates

                Parameter   Standard                         Hazard  95% Hazard Ratio

Parameter   DF   Estimate      Error Chi-Square Pr > ChiSq    Ratio Confidence Limits Label

group     2  1   -0.26825    0.50334     0.2840     0.5941    0.765    0.285    2.051 group 2

group     3  1   -1.31407    0.78532     2.7999     0.0943   0.269    0.058    1.252 group 3

                                  Hazard Ratios for group

                                         Point     95% Wald Confidence

                      Description     Estimate           Limits

                      group 1 vs 2       1.308       0.488       3.507

                      group 1 vs 3       3.721       0.798      17.344

3. Output  Just including group 1 and 2 in the model.  i.e. with a "where"

                           Analysis of Maximum Likelihood Estimates

                  Parameter   Standard                         Hazard  95% Hazard Ratio

  Parameter   DF   Estimate      Error Chi-Square Pr > ChiSq    Ratio Confidence Limits Label

  group     2  1   -0.29948    0.50575     0.3506     0.5538   0.741    0.275    1.997 group 2

                                    Hazard Ratios for group

                                           Point     95% Wald Confidence

                        Description     Estimate           Limits

                        group 1 vs 2       1.349       0.501       3.635

Super User
Posts: 18,569

hazard ratio

Okay, in the 1st regression you're treating your variable as CONTINUOUS when it sounds like its not. This is more valid for variables such as age.

The interpretation of the hazard ratio is sometimes hard when its less than 1, but it means for every 1 unit increase in 'group' there is a 0.58 times probability of dying. You can flip the ratio to 1/0.58 and then say for every 1 unit decrease in group there is a 1.7 times increased probability of dying.

In the second regression you are treating your variable as CATEGORICAL and comparing one to 2 and 1 to 3.

Then the interpretations are between groups rather than per unit increase. If your variables are age groups, ie group 1 is <20 and group 2 is 21 to 40 then this is the type of analysis you should be using.

You chose between 1 and 2 depending on the context of your variable, but if you only have 3 levels then I'm guessing its the second method.

Why the third doesn't agree, did you use the class variable for it still? Are you missing information for some observation that get included in one and not in another (ie are you sample sizes the same). without more info I can't answer that one.

HTH,

Reeza

Contributor
Posts: 20

hazard ratio

Thanks so much for your help Reeza.  My variable is catagorical (trt) and so I should be using option 2 output.  (using them similar to using contrasts in glm).

The output there that is a result of the hazardratio group   is actually the inverse of the hazard ratio in the lines above it - not sure why this switch occurs.

wrt to the proc phreg that I ran with only groups 1 and 2 - I did use the same data and included a class statement - so that is also still unknown.  However, not critical since I will use the model with all three groups together with the class statement.

Super User
Posts: 18,569

hazard ratio

I've noticed that as well about the hazard ratios...it irritates me, I'm sure there's probably a way to change this in the options but I want the CI for the default options, seems obvious enough to me!

Contributor
Posts: 20

hazard ratio

yup - agree.  thanks for you help. have a nice weekend.

Ask a Question
Discussion stats
  • 6 replies
  • 3004 views
  • 0 likes
  • 2 in conversation