BookmarkSubscribeRSS Feed
Season
Lapis Lazuli | Level 10

I am trying to build a Cox regression model and is planning to plot hazard functions. I learnt from SAS Help that SAS supports plotting hazard functions, with the basic code being as follows:

proc lifetest data=xxx plots=hazard;

I assume from professional knowledge that competing risks and time-dependent covariates may be needed in my Cox model. PROC LIFETEST itself is not a module for building Cox models. Yet it is a module that is capable of plotting hazard function when Cox proportional hazards model is built, which is the most basic and a very common situation. In short, if your data is eligible to build a Cox proportional hazards model, you can use the very same data to plot hazard functions in PROC LIFETEST.

But I wonder if (1) when both competing risks and time-dependent covariates are involved in the Cox model, can SAS still generate hazard function plots? (2) If so, how should I do this? Is there anything different from the situation where Cox proportional hazards model is built?

Thank you very much!

2 REPLIES 2
PaigeMiller
Diamond | Level 26

@Season wrote:

(1) when both competing risks and time-dependent covariates are involved in the Cox model, can SAS still generate hazard function plots?


My answer to questions like this, which boil down to "Can SAS do this", is always the same answer: refer to the ultimate authority on this matter, which is SAS itself. Try it and see.

--
Paige Miller
Season
Lapis Lazuli | Level 10

Well, I followed your suggestion and took a look at SAS Help of PROC LIFETEST once again. I admit that the process is fruitful, in that I saw the way of taking competing risks into account in TIME statement.

But I see nowhere of taking time-dependent covariates into account when I try to plot hazard function. What about that? Can SAS do that? (Sorry to have raised the question in the very same format once again, but I tried your method and is still stuck on that problem)

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 513 views
  • 0 likes
  • 2 in conversation