- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I need advice on how to "plot lines for multiple groups within a sas variable". I used proc lifetest to get output dataset and used proc gplot to produce an rtf file.
proc lifetest data= abc method=KM outsurv=xyz plot=(s); time duration*censor (1,2);
strata group ; run;
The variable "group" has "6 categories" and proc gplot gives me plot points by default so I used symbol statement with i=spline option, but it gave me a line graph for only one group
Here is the code:
proc gplot data = xyz;
symbol1 i=spline;
plot survival*duration= group / vaxis=axis1 haxis=axis2 legend=legend1;;
run;
How can I get line graphs for all the categories within the group? Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Here's some examples of SGPLOT code and survival curves
https://blogs.sas.com/content/graphicallyspeaking/2018/02/19/survival-plot-twist-using-sgplot-proced...
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If you submit
ODS GRAPHICS ON;
before your PROC LIFETEST call, the procedure should produce a survival plot automatically.