BookmarkSubscribeRSS Feed
lisa1
Calcite | Level 5

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:

lisa1_0-1611306429671.png

 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

3 REPLIES 3
Rick_SAS
SAS Super FREQ

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. 

lisa1
Calcite | Level 5

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?

 

 

 

Rick_SAS
SAS Super FREQ

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: 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
  • 3 replies
  • 3084 views
  • 0 likes
  • 2 in conversation