BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
LzyButEfficient
Calcite | Level 5

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.

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

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;

 

View solution in original post

2 REPLIES 2
FreelanceReinh
Jade | Level 19

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;

 

LzyButEfficient
Calcite | Level 5

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!

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 436 views
  • 0 likes
  • 2 in conversation