Hi all,
I'm struggling with my ods pdf TOC when using PROC LIFETEST along with ODS SELECT.
Beside the text defined in the ODS PROCLABEL statement, I get a second line in the TOC named "Survival Curves" which refers to the same graph. Can I get rid of it?
ods pdf output='mypath\filename.pdf' style = journal contents=on pdftoc = 1;
ods graphics on;
ods listing gpath='mypath';
ods graphics / imagename="g_tte_1" imagefmt=png;
ods noproctitle;
ods proclabel = 'Figure 14.2.2.59 Kaplan-Meier Plot of Time to XXX';
ods select survivalPlot;
proc lifetest data=mydat plots =(survival(atrisk(outside(0.15)) test));
time T*censor(0);
strata group;
run;
ods graphics off;
ods pdf close;
Bari Lawhorn has a great paper on PDF TOC: https://support.sas.com/resources/papers/proceedings11/252-2011.pdf
She presented it as a webinar to BASUG last year.
The slides are: https://www.basug.org/_files/ugd/6fce8c_aba2be0893314fa3bb3ca2c22fc1fc90.pdf
The recoding is: https://www.basug.org/videos?wix-vod-video-id=a17c9abb623e4f64b2ef843b0589dad3&wix-vod-comp-id=comp-...
ods document name=testAW(write);
ods select survivalPlot;
proc lifetest data=sashelp.bmt ;
time T*status(0);
strata group;
run;
ods document close;
proc document name=testAW;
list/ levels=all; run;
quit;
proc document name=testAW2(write);
setlabel \work.testAW\Lifetest#1\SurvivalPlot#1 "Figure 14.2.2.59 Kaplan-Meier Plot of Time to XXX";
copy \work.testAW\Lifetest#1\SurvivalPlot#1 to ^; /*copy to current directory*/
run;
list/ levels=all; run;
quit;
/*Create the desired PDF file*/
proc document name=work.testAW2;
ods pdf file="c:\temp\want.pdf" style = journal contents=on pdftoc = 1;
replay;
run;
ods pdf close;
quit;
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.