Programming the statistical procedures from SAS

Cox Regression: Can you get hazard ratios for an interaction term?

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

Cox Regression: Can you get hazard ratios for an interaction term?

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




Accepted Solutions
Solution
‎09-06-2016 02:31 PM
Super Contributor
Posts: 287

Re: Cox Regression: Can you get hazard ratios for an interaction term?

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


All Replies
Solution
‎09-06-2016 02:31 PM
Super Contributor
Posts: 287

Re: Cox Regression: Can you get hazard ratios for an interaction term?

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.

New Contributor
Posts: 2

Re: Cox Regression: Can you get hazard ratios for an interaction term?

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

 

--Cynthia

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 392 views
  • 5 likes
  • 2 in conversation