<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Excluding elements from proc lifetest output leaves a dangling header in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excluding-elements-from-proc-lifetest-output-leaves-a-dangling/m-p/593261#M23350</link>
    <description>&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to generate powerpoint slides with Kaplan-Meier plots in them, no tables. I have achieved this with the following code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro draw_kaplan_meier(population=, parameter=, title=, strata=, condition=);

	title %if &amp;amp;parameter EQ PFS %then "Progression Free Survival";
		%if &amp;amp;parameter EQ OS %then "Overall Survival";
		;
	title2 &amp;amp;title;

	proc lifetest data=adtte(where=(&amp;amp;population and PARAM EQ "&amp;amp;parameter" %if %length(&amp;amp;condition) GT 0 %then and &amp;amp;condition;)) plots=survival(atrisk(maxlen=20)) notable;
		time DAY * CENSORED(1);
		strata &amp;amp;strata %if %sysfunc(countw(&amp;amp;strata)) GT 1 %then /nolabel;;
	quit;

%mend draw_kaplan_meier;


proc template;
	define style styles.pptlsmallfont;
		parent=styles.powerpointlight;
		scheme "PPT Light Small Font" /
			body_font = ("Calibri, &amp;lt;MTsans-serif&amp;gt;, &amp;lt;sans-serif&amp;gt;", 14pt)
			heading_font = ("Calibri, &amp;lt;MTsans-serif&amp;gt;, &amp;lt;sans-serif&amp;gt;", 36pt);
	end;
run;

ods graphics on;
ods escapechar="~";
ods noproctitle;
ods powerpoint image_dpi=450 style=pptlsmallfont
	file="&amp;amp;output_path\kaplan_meier.pptx";
ods exclude CensoredSummary (persist) HomStats (persist) LogrankHomCov (persist) WilcoxonHomCov (persist) HomTests (persist) Legend (persist);

%draw_kaplan_meier(population=SAFFL EQ "Y", parameter=PFS, title=%str(Safety population), strata=SUBGR_A)
%draw_kaplan_meier(population=SAFFL EQ "Y", parameter=OS, title=%str(Safety population), strata=SUBGR_B)

title;
title2;
ods powerpoint close;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Unfortunately, despite all the exclusions, I can't get rid of the &lt;EM&gt;T&lt;/EM&gt;&lt;SPAN class="proctitle"&gt;&lt;EM&gt;esting&amp;nbsp;Homogeneity&amp;nbsp;of&amp;nbsp;Survival&amp;nbsp;Curves&amp;nbsp;for&amp;nbsp;DAY over&amp;nbsp;Strata&lt;/EM&gt;&amp;nbsp;title, which causes the desired KM plot to scale down unnecessarily. Do you know if there is a way to suppress this title? Thank you!&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 02 Oct 2019 07:10:45 GMT</pubDate>
    <dc:creator>js5</dc:creator>
    <dc:date>2019-10-02T07:10:45Z</dc:date>
    <item>
      <title>Excluding elements from proc lifetest output leaves a dangling header</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excluding-elements-from-proc-lifetest-output-leaves-a-dangling/m-p/593261#M23350</link>
      <description>&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to generate powerpoint slides with Kaplan-Meier plots in them, no tables. I have achieved this with the following code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro draw_kaplan_meier(population=, parameter=, title=, strata=, condition=);

	title %if &amp;amp;parameter EQ PFS %then "Progression Free Survival";
		%if &amp;amp;parameter EQ OS %then "Overall Survival";
		;
	title2 &amp;amp;title;

	proc lifetest data=adtte(where=(&amp;amp;population and PARAM EQ "&amp;amp;parameter" %if %length(&amp;amp;condition) GT 0 %then and &amp;amp;condition;)) plots=survival(atrisk(maxlen=20)) notable;
		time DAY * CENSORED(1);
		strata &amp;amp;strata %if %sysfunc(countw(&amp;amp;strata)) GT 1 %then /nolabel;;
	quit;

%mend draw_kaplan_meier;


proc template;
	define style styles.pptlsmallfont;
		parent=styles.powerpointlight;
		scheme "PPT Light Small Font" /
			body_font = ("Calibri, &amp;lt;MTsans-serif&amp;gt;, &amp;lt;sans-serif&amp;gt;", 14pt)
			heading_font = ("Calibri, &amp;lt;MTsans-serif&amp;gt;, &amp;lt;sans-serif&amp;gt;", 36pt);
	end;
run;

ods graphics on;
ods escapechar="~";
ods noproctitle;
ods powerpoint image_dpi=450 style=pptlsmallfont
	file="&amp;amp;output_path\kaplan_meier.pptx";
ods exclude CensoredSummary (persist) HomStats (persist) LogrankHomCov (persist) WilcoxonHomCov (persist) HomTests (persist) Legend (persist);

%draw_kaplan_meier(population=SAFFL EQ "Y", parameter=PFS, title=%str(Safety population), strata=SUBGR_A)
%draw_kaplan_meier(population=SAFFL EQ "Y", parameter=OS, title=%str(Safety population), strata=SUBGR_B)

title;
title2;
ods powerpoint close;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Unfortunately, despite all the exclusions, I can't get rid of the &lt;EM&gt;T&lt;/EM&gt;&lt;SPAN class="proctitle"&gt;&lt;EM&gt;esting&amp;nbsp;Homogeneity&amp;nbsp;of&amp;nbsp;Survival&amp;nbsp;Curves&amp;nbsp;for&amp;nbsp;DAY over&amp;nbsp;Strata&lt;/EM&gt;&amp;nbsp;title, which causes the desired KM plot to scale down unnecessarily. Do you know if there is a way to suppress this title? Thank you!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2019 07:10:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excluding-elements-from-proc-lifetest-output-leaves-a-dangling/m-p/593261#M23350</guid>
      <dc:creator>js5</dc:creator>
      <dc:date>2019-10-02T07:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: Excluding elements from proc lifetest output leaves a dangling header</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excluding-elements-from-proc-lifetest-output-leaves-a-dangling/m-p/593835#M23359</link>
      <description>&lt;P&gt;It looks like the text you want to suppress is a note in ODS not a title. I believe either adding the name of that note (&lt;CODE class=" language-sas"&gt;HomogeneityNote&lt;/CODE&gt;) to the exclude list or switching from excluding output to selecting the output you want to keep should work.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used this little toy example based on the code you provided and &lt;A href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_lifetest_examples02.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_self"&gt;Example 74.2 &lt;/A&gt;&amp;nbsp;in the PROC LIFETEST documentation to find the name of the note and test excluding it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Store ODS objects in test document */&lt;BR /&gt;ods document name=test(write);
ods exclude CensoredSummary  HomStats LogrankHomCov WilcoxonHomCov  HomTests Legend ;
proc lifetest data=sashelp.BMT plots=survival(atrisk=0 to 2500 by 500) notable;
   time T * Status(0);
   strata Group / test=logrank adjust=sidak;
run;
ods document close;&lt;BR /&gt;
/* List objects in test document  */
proc document name=test;
   list /levels=all;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="procDocOut.png" style="width: 471px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32943iA686D635473027BE/image-size/large?v=v2&amp;amp;px=999" role="button" title="procDocOut.png" alt="procDocOut.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*  Add note to exclude list */
ods exclude CensoredSummary  HomStats LogrankHomCov WilcoxonHomCov  HomTests Legend HomogeneityNote;
proc lifetest data=sashelp.BMT plots=survival(atrisk=0 to 2500 by 500) notable;
   time T * Status(0);
   strata Group / test=logrank adjust=sidak;
run;


/* Select only Homogeneity Tests and Survival Curves */
ods select  SurvDiff SurvivalPlot;
proc lifetest data=sashelp.BMT plots=survival(atrisk=0 to 2500 by 500) notable;
   time T * Status(0);
   strata Group / test=logrank adjust=sidak;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2019 19:54:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excluding-elements-from-proc-lifetest-output-leaves-a-dangling/m-p/593835#M23359</guid>
      <dc:creator>MichaelL_SAS</dc:creator>
      <dc:date>2019-10-03T19:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: Excluding elements from proc lifetest output leaves a dangling header</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excluding-elements-from-proc-lifetest-output-leaves-a-dangling/m-p/594034#M23360</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/256681"&gt;@MichaelL_SAS&lt;/a&gt;&amp;nbsp;, it worked!&lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2019 06:55:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Excluding-elements-from-proc-lifetest-output-leaves-a-dangling/m-p/594034#M23360</guid>
      <dc:creator>js5</dc:creator>
      <dc:date>2019-10-04T06:55:07Z</dc:date>
    </item>
  </channel>
</rss>

