<?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 Change the title in survival plot produced by phreg in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Change-the-title-in-survival-plot-produced-by-phreg/m-p/544310#M17925</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I ask for plots in proc phreg&amp;nbsp;and use the&amp;nbsp;baseline covariates statement to ask for a direct adjusted plot, the title "Direct Adjusted Survivor Functions" appears. How do I get rid of this? I have tried modifying the title by using ods trace to find the template for the survival graph and modify the proc template code. However, the template 'Stat.Phreg.Graphics.Survival' does not have a title with&amp;nbsp;"Direct Adjusted Survivor Functions." Is this the correct template for this graph? If so, how can I modify the code below to get rid of the title?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;Sarah&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc template;&lt;BR /&gt;source Stat.Phreg.Graphics.Survival;&lt;BR /&gt;define statgraph Stat.PHReg.Graphics.Survival;&lt;BR /&gt;dynamic title1 title2 title3 title4 xviewMin xviewMax group groupIndex&lt;BR /&gt;groupName plotCL plotHPD transparency piecewise _byline_ _bytitle_&lt;BR /&gt;_byfootnote_;&lt;BR /&gt;BeginGraph;&lt;BR /&gt;entrytitle TITLE1 TITLE3;&lt;BR /&gt;entrytitle TITLE2 TITLE4 / textattrs=GRAPHVALUETEXT;&lt;BR /&gt;layout overlay / xaxisopts=(linearopts=(viewmin=XVIEWMIN viewmax=&lt;BR /&gt;XVIEWMAX)) yaxisopts=(label="Survival Probability" shortlabel=&lt;BR /&gt;"Survival" linearopts=(viewmin=0 viewmax=1 tickvaluelist=(0 .2&lt;BR /&gt;.4 .6 .8 1.0)));&lt;BR /&gt;if (PLOTCL)&lt;BR /&gt;bandplot LimitLower=LOWERSURVIVAL LimitUpper=UPPERSURVIVAL x=&lt;BR /&gt;TIME / group=GROUP index=GROUPINDEX modelname="Survival"&lt;BR /&gt;datatransparency=transparency;&lt;BR /&gt;endif;&lt;BR /&gt;if (PLOTHPD)&lt;BR /&gt;bandplot LimitLower=LOWERHPDSURVIVAL LimitUpper=&lt;BR /&gt;UPPERHPDSURVIVAL x=TIME / group=GROUP index=GROUPINDEX&lt;BR /&gt;modelname="Survival" datatransparency=transparency;&lt;BR /&gt;endif;&lt;BR /&gt;if (EXISTS(PIECEWISE))&lt;BR /&gt;seriesplot y=SURVIVAL x=TIME / group=GROUP index=GROUPINDEX&lt;BR /&gt;name="Survival";&lt;BR /&gt;else&lt;BR /&gt;stepplot y=SURVIVAL x=TIME / group=GROUP index=GROUPINDEX&lt;BR /&gt;name="Survival";&lt;BR /&gt;endif;&lt;BR /&gt;if (EXISTS(GROUP))&lt;BR /&gt;discretelegend "Survival" / location=outside title=GROUPNAME;&lt;BR /&gt;endif;&lt;BR /&gt;endlayout;&lt;BR /&gt;if (_BYTITLE_)&lt;BR /&gt;entrytitle _BYLINE_ / textattrs=GRAPHVALUETEXT;&lt;BR /&gt;else&lt;BR /&gt;if (_BYFOOTNOTE_)&lt;BR /&gt;entryfootnote halign=left _BYLINE_;&lt;BR /&gt;endif;&lt;BR /&gt;endif;&lt;BR /&gt;EndGraph;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Mar 2019 18:27:38 GMT</pubDate>
    <dc:creator>sarahsasuser</dc:creator>
    <dc:date>2019-03-19T18:27:38Z</dc:date>
    <item>
      <title>Change the title in survival plot produced by phreg</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Change-the-title-in-survival-plot-produced-by-phreg/m-p/544310#M17925</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I ask for plots in proc phreg&amp;nbsp;and use the&amp;nbsp;baseline covariates statement to ask for a direct adjusted plot, the title "Direct Adjusted Survivor Functions" appears. How do I get rid of this? I have tried modifying the title by using ods trace to find the template for the survival graph and modify the proc template code. However, the template 'Stat.Phreg.Graphics.Survival' does not have a title with&amp;nbsp;"Direct Adjusted Survivor Functions." Is this the correct template for this graph? If so, how can I modify the code below to get rid of the title?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;Sarah&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc template;&lt;BR /&gt;source Stat.Phreg.Graphics.Survival;&lt;BR /&gt;define statgraph Stat.PHReg.Graphics.Survival;&lt;BR /&gt;dynamic title1 title2 title3 title4 xviewMin xviewMax group groupIndex&lt;BR /&gt;groupName plotCL plotHPD transparency piecewise _byline_ _bytitle_&lt;BR /&gt;_byfootnote_;&lt;BR /&gt;BeginGraph;&lt;BR /&gt;entrytitle TITLE1 TITLE3;&lt;BR /&gt;entrytitle TITLE2 TITLE4 / textattrs=GRAPHVALUETEXT;&lt;BR /&gt;layout overlay / xaxisopts=(linearopts=(viewmin=XVIEWMIN viewmax=&lt;BR /&gt;XVIEWMAX)) yaxisopts=(label="Survival Probability" shortlabel=&lt;BR /&gt;"Survival" linearopts=(viewmin=0 viewmax=1 tickvaluelist=(0 .2&lt;BR /&gt;.4 .6 .8 1.0)));&lt;BR /&gt;if (PLOTCL)&lt;BR /&gt;bandplot LimitLower=LOWERSURVIVAL LimitUpper=UPPERSURVIVAL x=&lt;BR /&gt;TIME / group=GROUP index=GROUPINDEX modelname="Survival"&lt;BR /&gt;datatransparency=transparency;&lt;BR /&gt;endif;&lt;BR /&gt;if (PLOTHPD)&lt;BR /&gt;bandplot LimitLower=LOWERHPDSURVIVAL LimitUpper=&lt;BR /&gt;UPPERHPDSURVIVAL x=TIME / group=GROUP index=GROUPINDEX&lt;BR /&gt;modelname="Survival" datatransparency=transparency;&lt;BR /&gt;endif;&lt;BR /&gt;if (EXISTS(PIECEWISE))&lt;BR /&gt;seriesplot y=SURVIVAL x=TIME / group=GROUP index=GROUPINDEX&lt;BR /&gt;name="Survival";&lt;BR /&gt;else&lt;BR /&gt;stepplot y=SURVIVAL x=TIME / group=GROUP index=GROUPINDEX&lt;BR /&gt;name="Survival";&lt;BR /&gt;endif;&lt;BR /&gt;if (EXISTS(GROUP))&lt;BR /&gt;discretelegend "Survival" / location=outside title=GROUPNAME;&lt;BR /&gt;endif;&lt;BR /&gt;endlayout;&lt;BR /&gt;if (_BYTITLE_)&lt;BR /&gt;entrytitle _BYLINE_ / textattrs=GRAPHVALUETEXT;&lt;BR /&gt;else&lt;BR /&gt;if (_BYFOOTNOTE_)&lt;BR /&gt;entryfootnote halign=left _BYLINE_;&lt;BR /&gt;endif;&lt;BR /&gt;endif;&lt;BR /&gt;EndGraph;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 18:27:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Change-the-title-in-survival-plot-produced-by-phreg/m-p/544310#M17925</guid>
      <dc:creator>sarahsasuser</dc:creator>
      <dc:date>2019-03-19T18:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: Change the title in survival plot produced by phreg</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Change-the-title-in-survival-plot-produced-by-phreg/m-p/544315#M17926</link>
      <description>&lt;P&gt;The SAS/STAT documentation discusses several ways to change the titles (and other features) of the ODS graphics. For the title, you can read the section &lt;A href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_templt_sect032.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_self"&gt;"ODS Graphics Template Modification: Changing Titles by Using the %GrTitle Macro"&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the %GrTitle macro applied to the survival plot in PROC PHREG. The example and data are from &lt;A href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_phreg_gettingstarted.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_self"&gt;the Getting Started example in the doc.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Example from Getting Started example for PHREG procedure */
data Rats;
   label Days  ='Days from Exposure to Death';
   input Days Status Group @@;
   datalines;
143 1 0   164 1 0   188 1 0   188 1 0
190 1 0   192 1 0   206 1 0   209 1 0
213 1 0   216 1 0   220 1 0   227 1 0
230 1 0   234 1 0   246 1 0   265 1 0
304 1 0   216 0 0   244 0 0   142 1 1
156 1 1   163 1 1   198 1 1   205 1 1
232 1 1   232 1 1   233 1 1   233 1 1
233 1 1   233 1 1   239 1 1   240 1 1
261 1 1   280 1 1   280 1 1   296 1 1
296 1 1   323 1 1   204 0 1   344 0 1
;

data Regimes;
   Group=0;   output;
   Group=1;   output;
run;

ods trace on;
ods graphics on;
proc phreg data=Rats plot(overlay)=survival;
   model Days*Status(0)=Group;
   baseline covariates=regimes out=_null_;
run;
ods trace off;

%grtitle(path=Stat.Phreg.Graphics.Survival)

%let PHReg_Survival = The Title of My Plot;
%let PHReg_Survival2 = An optional subtitle;
proc phreg data=Rats plot(overlay)=survival;
   model Days*Status(0)=Group;
   baseline covariates=regimes out=_null_;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Mar 2019 18:40:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Change-the-title-in-survival-plot-produced-by-phreg/m-p/544315#M17926</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-03-19T18:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: Change the title in survival plot produced by phreg</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Change-the-title-in-survival-plot-produced-by-phreg/m-p/544390#M17927</link>
      <description>This worked! Thanks!</description>
      <pubDate>Tue, 19 Mar 2019 21:58:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Change-the-title-in-survival-plot-produced-by-phreg/m-p/544390#M17927</guid>
      <dc:creator>sarahsasuser</dc:creator>
      <dc:date>2019-03-19T21:58:27Z</dc:date>
    </item>
  </channel>
</rss>

