BookmarkSubscribeRSS Feed
dave3
Calcite | Level 5

Hi and thanks for your help! Currently using SAS_UE (SAS Studio)

 

1) When computing hazard ratios with PROC PHREG using the HAZARDRATIO statement, both the Point Estimates and 95% Wald Confidence Limits seem to vary depending on which values are used as the 'Reference' values for the involved variables.

 

2) However, the HR's no longer vary with Reference changes if the interaction variable is removed from the model; when it is removed, the HR's are the same regardless of the reference values used. Not sure why that would be the case if I'm only calculating the HR at one value of Margins

 

Briefly:

 

Margins

0 = No surgery

1 = Negative margins

2 = Positive margins

 

Surgery

0 = No surgery 

1 = Type1 surgery

2 = Type2 surgery

 

PROC PHREG data=work.import simple ;

CLASS

Grade

Size
Margins (Ref="No surgery")    /* Why does changing the reference value change the hazard ratios */
Surgery (Ref="None")          /* Why does changing the reference value change the hazard ratios */

/ param=Ref;

MODEL Time*Censor(1)=

Grade

Size

Margins

Surgery

Surgery*Margins

/ selection=backward;

 

HAZARDRATIO Surgery / at (Margins="Positive") diff=all;

 

So ultimately, if I want to compare Type1 and Type2 surgeries when Margins="Positive" (and also compare when Margins=Negative):

A) Do I even need the interaction variable? Why not just leave them separate and do HAZARDRATIO at Margins="Positive"

B) Should I set the Reference values to Surgery="Type2" and Margins="Positive" because those values are evaluated in the HAZARDRATIO statement? or should I use reference values that are won't be assessed in the HAZARDRATIO statement (like Surgery="No surgery", and Margins="Negative" or "No surgery").

 

Tabulated the HR's, ran +/– interaction term and changing the reference values for Surgery and Margins

Each HR here is from Results for [Surgery Type1 vs Type2 At Margins=Positive] 

Intreraction?Surgery RefMargins RefHRLlimitUlimit
No interactionType1Negative0.3240.2530.414
Surgery*MarginsType1Negative0.3250.2430.433
No interactionNoneNegative0.3240.2530.414
Surgery*MarginsNoneNegative0.2880.1730.478
No interactionType2Negative0.3240.2530.414
Surgery*MarginsType2Negative0.2880.1730.478
No interactionType1Positive0.3240.2530.414
Surgery*MarginsType1Positive0.3250.2430.433
No interactionNonePositive0.3240.2530.414
Surgery*MarginsNonePositive0.2880.1730.478
No interactionType2Positive0.3240.2530.414
Surgery*MarginsType2Positive0.2880.1730.478

 

Thank you!!

-D

 

2 REPLIES 2
JeffMeyers
Barite | Level 11

Hello,

    I'm not sure how familiar you are with the concept of hazard ratios, but I'll try answer your general question "Why do the hazard ratios change when I change the reference value."  A hazard ratio is looking at the "hazard" of being in one group compared to another group (the reference) in regards to the event in your model (e.g. tumor recurrence). 

 

In colon cancer males tend to perform worse than females in terms of the tumor growing back (recurring).  If you were to look at the hazard ratio for gender regarding time to recurrence in colon cancer, the hazard ratio would be greater than 1 if females were the reference.  This is because groups that have a hazard ratio greater than 1 have more "hazard" compared to the reference group (are worse off).  Therefore if you switched the reference group to be the males, then the hazard ratio would become less than 1 (females are better off than the males in the reference group).

For example:

  • Males are reference group => Females vs Males => Hazard Ratio =0.6 => Females are better off than males
  • Females are reference group => Males vs Females => Hazard ratio =1.67 => Males are worse off than females

 

When I read the syntax for the HAZARDRATIOS statement it refers to variables involved in interaction terms when you use the AT option.  I believe this is why your hazard ratios don't change when you remove the interaction term.  There is no longer an interaction term for the AT option to do anything, and doesn't care what the reference value is of margins.  When you say that your table includes the hazard ratios for the Surgery Type1 vs Type2 At Margins=Positive case, that means that you are only showing the values where TYPE2 is the reference value regardless of what you put in your CLASS statement, and the MARGINS variable no longer matters so the hazard ratios are always the same (with no interaction term).

 

I notice that you are using the DIFF=ALL option in your HAZARDRATIOS statement as well, this makes it give you all the hazard ratios for each of the potential reference values.  If you only want to see the hazard ratios for the reference values you specify in your CLASS statement, then use DIFF=REF instead.

 

Now when you include the interaction term there is a lot more complicated calculation going on to get the hazard ratio that depends on the reference values for both variables.  Your "Surgery Type1 vs Type2 At " will always tell you what your variable's current reference value is, but then the value will change based on the value of MARGIN, and whether that value is currently the reference group or not.  This is why the values change in the table when you modify the reference value of MARGIN with the interaction term in the model.  I don't know the actual stat theory formulas to show why though.

dave3
Calcite | Level 5

Sorry for the confusion, meant for the same comparison when using covariates with >2 values. For example, in lung cancer cell types (large, small, adeno, squamous), I would expect the hazard ratio for Large vs. Small cell types to be the same regardless of whether the reference cell type was Adeno or Squamous.

 

 

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1587 views
  • 0 likes
  • 2 in conversation