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

 

 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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
  • 1029 views
  • 0 likes
  • 2 in conversation