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
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.
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.
Thank you, Jacob. Your response was very helpful. Thank you for taking the time to provide it.
--Cynthia
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.