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 2025: Call for Content

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!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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