BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
clcominsky
Calcite | Level 5

When reporting hazard ratios for Cox regression analysis, is it common to report the hazard ratio for the interaction term itself?

For example, I have a model with 3 terms:

a

b

a*b

Using hazard ratio statements in SAS 9.4, I get a hazard ratio for 1) a at the mean of b, and 2) b at the mean of a. My understanding is that these hazard ratios are hazard ratios for the main effect variable (variable a or b) while holding the interacting variable constant. Is my understanding correct?

 

Is it possible to get a hazard ratio for the interaction term?

 

Thank you



1 ACCEPTED SOLUTION

Accepted Solutions
JacobSimonsen
Barite | Level 11

Yes, you can include interaction-terms. You should use the option "/param=glm" in the class statement.

With the hazard-ratio statement you can easily get the effect of one of the terms on each level of the other term. Like this:

data simulation;
*the the hazard ratio for A=1 vs A=2 is 1, 1.5 and 2 for respectively B=1, 2, 3; array a_effect{3} _temporary_ (1,1.5,2); do B=1 to 3; do A=1 to 2; do i=1 to 100; t=rand('exponential',1/exp((a=1)*log(a_effect[B]))); output; end; end; end; run; proc phreg data=simulation; class a b/param=glm; model t=a*b; hazardratio a/at(B=all); run;

Good luck.

View solution in original post

2 REPLIES 2
JacobSimonsen
Barite | Level 11

Yes, you can include interaction-terms. You should use the option "/param=glm" in the class statement.

With the hazard-ratio statement you can easily get the effect of one of the terms on each level of the other term. Like this:

data simulation;
*the the hazard ratio for A=1 vs A=2 is 1, 1.5 and 2 for respectively B=1, 2, 3; array a_effect{3} _temporary_ (1,1.5,2); do B=1 to 3; do A=1 to 2; do i=1 to 100; t=rand('exponential',1/exp((a=1)*log(a_effect[B]))); output; end; end; end; run; proc phreg data=simulation; class a b/param=glm; model t=a*b; hazardratio a/at(B=all); run;

Good luck.

clcominsky
Calcite | Level 5

Thank you, Jacob. Your response was very helpful. Thank you for taking the time to provide it.

 

--Cynthia

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
  • 3808 views
  • 5 likes
  • 2 in conversation