- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks in advance for your time and I apologize for how naieve my question might be! I am just looking for big-picture input - not expecting code or any specific solution. For the record I am using SAS 9.3 and do not currently have access to SAS 9.4.
I am generating a survival plot using PHREG. I have generated survival plots using two different methods: 1) plots generated within PHREG using the PLOTS = option and 2) plots generated using SGPLOT and the dataset output by the PHREG BASELINE statement.
For either of these approaches, is it possible (in SAS 9.3) to generate a survival plot that contains the number of subjects at risk along the x-axis (time)? I know how to do this in PROC LIFETEST (i.e. by using PROC TEMPLATE); however I can't figure out how to do this in PROC PHREG. Can I use the same PROC TEMPLATE approach I use for PROC LIFETEST to revise the axis in SGPLOT?
I have reviewed the following resources (and drawn the corresponding conclusions):
- This reference seems to indicate that PHREG is capable of generating the ATRISK data. However, I can't figure out how to incorporate it in the plot. Furthermore, I'm not sure how to output these data in the dataset generated by my BASELINE statement. However, I assume I can figure out how to join the ATRISK table with my survival table. But this still doesn't solve the problem of how to get it into the plot.
http://blogs.sas.com/content/graphicallyspeaking/2014/02/09/survival-plot/
- This reference seems to indicate that SAS 9.4 incorporates is capable of doing what I want (i.e. plot ATRISK values using SGPLOT's XAXISTABLE statmenet. However, as far as I can tell, this reference only describes how SAS 9.3 can plot the ATRISK values using PROC LIFETEST.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I am not very familiar with the details of LIFETEST or PHREG, but I have used LIFETEST to generate survival data along with the ATRISK table at intervals. This data can be saved to a data set using ODS OUTPUT statement. Then one can use SGPLOT to create the actual survival plot that includes the display of the at risk values. With SAS 9.4, you can ues XAXISTABLE that has been explicilty built for such use cases to display the at-risk data. With SAS 9.3, you can display the at-risk data using SGANNOTATE.
The paper "Clinical Graphs Using SAS" describes both methods.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
From my understanding, I thought that Proc Lifetest was for Kaplan-Meier Survival Curves, and Proc PHREG was for Hazard Ratio's, i.e. Forest Plots.
Someone else might know more though...
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
PHREG does have the ability to generate survival plots. In my experience it can be useful in case where you want to generate plots that are adjusted (or weighted) for other factors beyond the strata displayed in the plot (or weighted). However, perhaps it is limited in other ways (e.g. maybe it can't be used to display ATRISK data).
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I am not very familiar with the details of LIFETEST or PHREG, but I have used LIFETEST to generate survival data along with the ATRISK table at intervals. This data can be saved to a data set using ODS OUTPUT statement. Then one can use SGPLOT to create the actual survival plot that includes the display of the at risk values. With SAS 9.4, you can ues XAXISTABLE that has been explicilty built for such use cases to display the at-risk data. With SAS 9.3, you can display the at-risk data using SGANNOTATE.
The paper "Clinical Graphs Using SAS" describes both methods.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I think you can use the method here. You'll need to generate your data and probably create a custom template using SGTEMPLATE, then use SGRENDER to create your plot.