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

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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