BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Yuna11
Fluorite | Level 6
	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. 

1 ACCEPTED SOLUTION

Accepted Solutions
JOL
SAS Employee JOL
SAS Employee

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 */

 

 

View solution in original post

1 REPLY 1
JOL
SAS Employee JOL
SAS Employee

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 */

 

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 895 views
  • 0 likes
  • 2 in conversation