10-30-2014 05:29 AM
I am currently using Cox to estimate the hazard ratio of death in control vs treatment groups. However, there is an interaction with follow-up time and hazard ratio, with the HR initally being higher and crossing '1' after approx. 2 years of follow-up. I would like to visualize this changing HR by plotting the HR as a function of time. Is this possible in SAS?
Second question, am i correct in saying that the proportional hazards assumption is violated?
I have attached an example of what I am trying to achieve (attached PDF, figure 1B).
Thank you in advance for your help!
04-30-2016 04:09 PM
Don't know if this topic still interests you. I have a macro suite that implements Paul Lambert's flexible parametric survival analysis (stata) program stpm2. With that installed, you will be able to fit a parametric model that allows for the HR to vary over follow-up time, and to plot the HR estimates (and its conf. limits). It could also be used to estimate most of the other measures that you saw in the article you posted (hazard differences, differences in survival curves...)
Let me know if you are interested.
04-30-2016 04:50 PM
@epiman46 This sounds like a useful macro that would be nice to have. Would you consider writing an article in the Library here on the SAS Support Communities? You could post the macro to that article as a ZIP file.
If the macro uses SAS/IML to do the computations, you could also post the macro to the SAS/IML File Exchange.
05-01-2016 01:20 PM
I certainly could. The thing itself is still being developed, however, with some new features being added, now that I have a bit of time to work on it. So I would want it to be clear that it is a work in progress, with some features fully realised, and others to come. Currently, it clocks in at just over 1,700 lines of code. But it would be really nice to get some feedback from users.
Is there an FAQ about writing for the library?
05-06-2016 10:10 AM
You can follow the basic advice in the article "How to contribute to the SAS/IML File Exchange." Most of the suggestions would apply equally well to a macro submission to the general library here at the SAS Support Communities.