Dear all,
I have survival data for which I want to calculate the effect of the time-dependent variable "response". I already know how to get the results I need with proc phreg (it should look like this:
This is an example in the document I found that explains how to use proc phreg in my case -> https://www.lexjansen.com/pharmasug-cn/2017/SP/PharmaSUG-China-2017-SP01.pdf ), but I also want to plot the data. The normal Kaplan-Meier method is inappropriate because only fixed covariates are considered which do not change over time.
I found that Simon and Makuch introduced a plot that is an expansion of the Kaplan Meier plot with respect to time-dependent covariates. Is there a way to customize the Kaplan-Meier-plot in SAS or another method in SAS with which I can plot my data? I wasn't able to find anything that fits my problem.
Thanks a lot and kind regards
Lisa
1. Please provide a reference to the "Simon and Makuch Plot." Is it one of the graphs in Xue and Lai (2017)? If not, perhaps you can upload a sketch of the graph you want, based on the Stan data.
2. Yes, there is a whole chapter in the documentation that describes ways to modify the Kaplan-Meier plot in SAS.
Thanks for your answer.
Here are a few Simon and Makuch plots given:
https://onlinelibrary.wiley.com/doi/epdf/10.1002/mpr.124
I couldn't find anything helpful in the documentation that describes procedures with time-dependent covariables. Did I miss something?
> This is an example ... that explains how to use proc phreg in my case - but I also want to plot the data.
OK. So it sounds like you can generate the output but just need to plot it. In the paper, the graphs are step functions that plot some time-like variable versus the probability of survival. You can read about how to use the STEP statement in PROC SGPLOT to create a step function in SAS.
Here is an example that shows how to graph (fake) data for two treatment groups. The data are in the long form, so if you have more than two groups, the code does not change:
data SMCurve;
input Treatment $ Time Prob;
datalines;
A 0 1.0
A 16 0.95
A 18 0.90
A 20 0.87
A 24 0.79
A 30 0.75
A 32 0.75
B 0 1.0
B 5 0.98
B 9 0.97
B 12 0.95
B 14 0.92
B 16 0.89
B 22 0.83
B 25 0.81
B 28 0.80
B 32 0.80
;
title "Simon and Makuch Method";
title2 "Time Dependent Covariates";
proc sgplot data=SMCurve noautolegend;
step x=Time y=Prob / group=Treatment;
yaxis grid label="Probability of Survival";
run;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.