ods pdf anchor = "&xtab";
ods proclabel="Figure &xTabnum";
ods rtf file="" nogtitle nogfootnote;
ODS graphics on;
ods exclude all;
ods select survivalPlot;
options nodate nonumber;
/***************************************************/
%ProvideSurvivalMacros
%let yOptions = label="Survival Probability"
labelattrs=(size=10pt weight=bold)
tickvalueattrs=(size=8pt)
linearopts=(viewmin=0 viewmax=1
tickvaluelist=(0 .2 .4 .6 .8 1.0));
%let xOptions = label="Weeks"
offsetmin=.05
labelattrs=(size=10pt weight=bold)
tickvalueattrs=(size=8pt)
linearopts=(viewmax=MAXTIME tickvaluelist=XTICKVALS
tickvaluefitpolicy=XTICKVALFITPOL);
%let GraphOpts = DesignHeight=DefaultDesignWidth;
%SurvivalSummaryTable
%macro StmtsTop;
referenceline y=0.5;
%mend;
%CompileSurvivalTemplates
%let LegendOpts = ;
proc lifetest data = data_surv outsurv=surv_out plots=survival(atrisk
(atrisktickonly outside maxlen=13 outside)=0 2 8 10);
time Time*censor(1);
strata Treatment/order=internal;
survival conftype=loglog;
run;
ods exclude none;
ods rtf close;
ods pdf close;
I just want to have the survival plot printed in my report how to remove all the lifetest procedure stuff? Anything wrong in my code?
Also, another question is that I have only one treatment, why I don't the treatment legend showing up for just that one treatment.
Add the following ODS statements:
ods trace on; /* Writes the names of the output tables and graphs to the Log */
ods select SurvivalPlot NegLogSurvivalPlot; /* Chooses the specific output you want */
Add the following ODS statements:
ods trace on; /* Writes the names of the output tables and graphs to the Log */
ods select SurvivalPlot NegLogSurvivalPlot; /* Chooses the specific output you want */
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!
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.