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.
If you submit
ODS GRAPHICS ON;
before your PROC LIFETEST call, the procedure should produce a survival plot automatically.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.