Hi,
I want to plot an overall KM curve and subgroups KM curves on the same plot. I can't seem to find how to do this, all examples I've seen only have subgroups but not overall.
Thanks.
Hi @LzyButEfficient and welcome to the SAS Support Communities (as a contributor)!
If the graph does not contain statistics about group comparisons, you can simply create a new input dataset from the existing one with a new group "Overall" (in the STRATA variable) comprising all observations. Here's how you would create it from sashelp.bmt (which is used in the PROC LIFETEST documentation):
data want;
set sashelp.bmt;
output;
group='Overall';
output;
run;
Hi @LzyButEfficient and welcome to the SAS Support Communities (as a contributor)!
If the graph does not contain statistics about group comparisons, you can simply create a new input dataset from the existing one with a new group "Overall" (in the STRATA variable) comprising all observations. Here's how you would create it from sashelp.bmt (which is used in the PROC LIFETEST documentation):
data want;
set sashelp.bmt;
output;
group='Overall';
output;
run;
I just need survival curves without any group comparison statistics and this was such a simple solution that I'm upset I didn't think of it!
Thanks for your help!
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.