<?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 Re: How to remove title &amp;quot;Stratum 1: _trt = 2&amp;quot; from KM plot using PROC LIFETEST PLOTS? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-to-remove-title-quot-Stratum-1-trt-2-quot-from-KM-plot-using/m-p/516596#M17492</link>
    <description>&lt;P&gt;Many thanks. Yes, it's the easiest way to use sgplot or template+sgrender. However, my manager insist use plots statement in proc lifetest ... &amp;nbsp;&amp;gt;_&amp;lt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I noticed that if there are 2 strata, "Stratum 1: _trt = 2" will not display. As shown below, it's generated using the same code but for another BY group.&amp;nbsp;Are the&amp;nbsp;different default templates were used for single group and multiple groups? If yes, may I ask what's the names of the 2 different templates?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.jpg" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25214i87FCCF4DAD870FB9/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.jpg" alt="2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Nov 2018 07:48:15 GMT</pubDate>
    <dc:creator>yukixjxq2</dc:creator>
    <dc:date>2018-11-28T07:48:15Z</dc:date>
    <item>
      <title>How to remove title "Stratum 1: _trt = 2" from KM plot using PROC LIFETEST PLOTS?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-remove-title-quot-Stratum-1-trt-2-quot-from-KM-plot-using/m-p/516579#M17489</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xx.jpg" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25213iD9F7531A28E1B82E/image-size/large?v=v2&amp;amp;px=999" role="button" title="xx.jpg" alt="xx.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;May I ask how to remove the title and words in red box above, e.g.&amp;nbsp;"&lt;SPAN&gt;Stratum 1: _trt = 2&lt;/SPAN&gt;", "for _trt=2"? It's the results of PROC LIFETEST. Please refer to my code below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods noptitle;&lt;/P&gt;&lt;P&gt;proc lifetest data=km1 plots=survival(atrisk=0 to 30 by 1 test) alphaqt=0.05 missing;&lt;BR /&gt;&amp;nbsp; by RAS_1C;&lt;BR /&gt;&amp;nbsp; time eevaluem*eventn(0);&lt;BR /&gt;&amp;nbsp; strata _trt;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Ke&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2018 05:43:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-remove-title-quot-Stratum-1-trt-2-quot-from-KM-plot-using/m-p/516579#M17489</guid>
      <dc:creator>yukixjxq2</dc:creator>
      <dc:date>2018-11-28T05:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove title "Stratum 1: _trt = 2" from KM plot using PROC LIFETEST PLOTS?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-remove-title-quot-Stratum-1-trt-2-quot-from-KM-plot-using/m-p/516593#M17490</link>
      <description>&lt;P&gt;You could use PROC TEMPLATE and change the underlying template of the KM plot like&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16777"&gt;@WarrenKuhfeld&lt;/a&gt;&amp;nbsp;demonstrates in various places.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I think that is a bit overkill in this situation. I think the easiest here is to retrieve the underlying data of the KM plot and draw the plot with PROC SGPLOT to control the title yourself. I have posted an example of doing so below from the PROC LIFETEST documentation. It should be applicable to your problem as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data VALung;
   drop check m;
   retain Therapy Cell;
   infile cards column=column;
   length Check $ 1;
   label SurvTime='Failure or Censoring Time'
      Kps='Karnofsky Index'
      DiagTime='Months till Randomization'
      Age='Age in Years'
      Prior='Prior Treatment?'
      Cell='Cell Type'
      Therapy='Type of Treatment'
      Treatment='Treatment Indicator';
   M=Column;
   input Check $ @@;
   if M&amp;gt;Column then M=1;
   if Check='s'|Check='t' then input @M Therapy $ Cell $ ;
   else input @M SurvTime Kps DiagTime Age Prior @@;
   if SurvTime &amp;gt; .;
   censor=(SurvTime&amp;lt;0);
   SurvTime=abs(SurvTime);
   Treatment=(Therapy='test');
   datalines;
standard squamous
 72 60  7 69  0   411 70  5 64 10   228 60  3 38  0   126 60  9 63 10
118 70 11 65 10    10 20  5 49  0    82 40 10 69 10   110 80 29 68  0
314 50 18 43  0  -100 70  6 70  0    42 60  4 81  0     8 40 58 63 10
144 30  4 63  0   -25 80  9 52 10    11 70 11 48 10
standard small
 30 60  3 61  0   384 60  9 42  0     4 40  2 35  0    54 80  4 63 10
 13 60  4 56  0  -123 40  3 55  0   -97 60  5 67  0   153 60 14 63 10
 59 30  2 65  0   117 80  3 46  0    16 30  4 53 10   151 50 12 69  0
 22 60  4 68  0    56 80 12 43 10    21 40  2 55 10    18 20 15 42  0
139 80  2 64  0    20 30  5 65  0    31 75  3 65  0    52 70  2 55  0
287 60 25 66 10    18 30  4 60  0    51 60  1 67  0   122 80 28 53  0
 27 60  8 62  0    54 70  1 67  0     7 50  7 72  0    63 50 11 48  0
392 40  4 68  0    10 40 23 67 10
standard adeno
  8 20 19 61 10    92 70 10 60  0    35 40  6 62  0   117 80  2 38  0
132 80  5 50  0    12 50  4 63 10   162 80  5 64  0     3 30  3 43  0
 95 80  4 34  0
standard large
177 50 16 66 10   162 80  5 62  0   216 50 15 52  0   553 70  2 47  0
278 60 12 63  0    12 40 12 68 10   260 80  5 45  0   200 80 12 41 10
156 70  2 66  0  -182 90  2 62  0   143 90  8 60  0   105 80 11 66  0
103 80  5 38  0   250 70  8 53 10   100 60 13 37 10
test squamous
999 90 12 54 10   112 80  6 60  0   -87 80  3 48  0  -231 50  8 52 10
242 50  1 70  0   991 70  7 50 10   111 70  3 62  0     1 20 21 65 10
587 60  3 58  0   389 90  2 62  0    33 30  6 64  0    25 20 36 63  0
357 70 13 58  0   467 90  2 64  0   201 80 28 52 10     1 50  7 35  0
 30 70 11 63  0    44 60 13 70 10   283 90  2 51  0    15 50 13 40 10
test small
 25 30  2 69  0  -103 70 22 36 10    21 20  4 71  0    13 30  2 62  0
 87 60  2 60  0     2 40 36 44 10    20 30  9 54 10     7 20 11 66  0
 24 60  8 49  0    99 70  3 72  0     8 80  2 68  0    99 85  4 62  0
 61 70  2 71  0    25 70  2 70  0    95 70  1 61  0    80 50 17 71  0
 51 30 87 59 10    29 40  8 67  0
test adeno
 24 40  2 60  0    18 40  5 69 10   -83 99  3 57  0    31 80  3 39  0
 51 60  5 62  0    90 60 22 50 10    52 60  3 43  0    73 60  3 70  0
  8 50  5 66  0    36 70  8 61  0    48 10  4 81  0     7 40  4 58  0
140 70  3 63  0   186 90  3 60  0    84 80  4 62 10    19 50 10 42  0
 45 40  3 69  0    80 40  4 63  0
test large
 52 60  4 45  0   164 70 15 68 10    19 30  4 39 10    53 60 12 66  0
 15 30  5 63  0    43 60 11 49 10   340 80 10 64 10   133 75  1 65  0
111 60  5 64  0   231 70 18 67 10   378 80  4 65  0    49 30  3 37  0
;

ods graphics on;
proc lifetest data=VALung plots=(s,ls,lls) outtest=Test maxtime=600;
   time SurvTime*Censor(1);
   id Therapy;
   strata Cell;
   test Age Prior DiagTime Kps Treatment;
   ods output SurvivalPlot=Survivalplot;
run;
ods graphics off;

title "Whatever Title You Want";
proc sgplot data=SurvivalPlot;
   step x=Time y=Survival / group=Stratum;
   scatter x=Time y=Censored / markerattrs=(symbol=plus);
run;
title;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Nov 2018 07:39:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-remove-title-quot-Stratum-1-trt-2-quot-from-KM-plot-using/m-p/516593#M17490</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-11-28T07:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove title "Stratum 1: _trt = 2" from KM plot using PROC LIFETEST PLOTS?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-remove-title-quot-Stratum-1-trt-2-quot-from-KM-plot-using/m-p/516594#M17491</link>
      <description>&lt;P&gt;And welcome to the SAS communities &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2018 07:39:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-remove-title-quot-Stratum-1-trt-2-quot-from-KM-plot-using/m-p/516594#M17491</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-11-28T07:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove title "Stratum 1: _trt = 2" from KM plot using PROC LIFETEST PLOTS?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-remove-title-quot-Stratum-1-trt-2-quot-from-KM-plot-using/m-p/516596#M17492</link>
      <description>&lt;P&gt;Many thanks. Yes, it's the easiest way to use sgplot or template+sgrender. However, my manager insist use plots statement in proc lifetest ... &amp;nbsp;&amp;gt;_&amp;lt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I noticed that if there are 2 strata, "Stratum 1: _trt = 2" will not display. As shown below, it's generated using the same code but for another BY group.&amp;nbsp;Are the&amp;nbsp;different default templates were used for single group and multiple groups? If yes, may I ask what's the names of the 2 different templates?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.jpg" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25214i87FCCF4DAD870FB9/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.jpg" alt="2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2018 07:48:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-remove-title-quot-Stratum-1-trt-2-quot-from-KM-plot-using/m-p/516596#M17492</guid>
      <dc:creator>yukixjxq2</dc:creator>
      <dc:date>2018-11-28T07:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove title "Stratum 1: _trt = 2" from KM plot using PROC LIFETEST PLOTS?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-remove-title-quot-Stratum-1-trt-2-quot-from-KM-plot-using/m-p/516672#M17493</link>
      <description>&lt;P&gt;&lt;A href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_kaplan_sect017.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_blank"&gt;https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_kaplan_sect017.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once you learn to use the techniques in this example, you will find it easy to make all kinds of modifications.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2018 14:15:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-remove-title-quot-Stratum-1-trt-2-quot-from-KM-plot-using/m-p/516672#M17493</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2018-11-28T14:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove title "Stratum 1: _trt = 2" from KM plot using PROC LIFETEST PLOTS?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-remove-title-quot-Stratum-1-trt-2-quot-from-KM-plot-using/m-p/517379#M17503</link>
      <description>&lt;P&gt;Thank you so much! The document you provided is very helpful! Base on it, I have successfully updated the title and almost every element of the KM plot. There is still only one issue left. How to remove&amp;nbsp;"&lt;SPAN&gt;Stratum 1: _trt = 2&lt;/SPAN&gt;" in the first KM plot? I noticed it only occurred in single-stratum case. But&amp;nbsp;I could not find any definition about it in the template Stat.Lifetest.Graphics.ProductLimitSurvival. I use "ods trace on;" to check the&amp;nbsp;two KM plots. The same template was used. The only difference is in Path. There is a "Stratum1." in the Path of first single-stratum&amp;nbsp;plot. Is there any way to remove "&lt;SPAN&gt;Stratum 1: _trt = 2&lt;/SPAN&gt;" from the single-stratum&amp;nbsp;plot?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="q1.jpg" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25278iC2C7B225F78FD59C/image-size/large?v=v2&amp;amp;px=999" role="button" title="q1.jpg" alt="q1.jpg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="q2.jpg" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25279iFAB4E6C908573454/image-size/large?v=v2&amp;amp;px=999" role="button" title="q2.jpg" alt="q2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;DIV class="sasSource"&gt;Output Added:&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;-------------&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;Name:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SurvivalPlot&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;Label:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Survival Curve&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;Template:&amp;nbsp;&amp;nbsp; Stat.Lifetest.Graphics.ProductLimitSurvival&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;Path:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Lifetest.ByGroup1.Stratum1.SurvivalPlot&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;-------------&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The homogeneity tests across strata were omitted since there is only one stratum.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The above message was for the following BY group:&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HRAS/KRAS/NRAS Missense Status=HRAS/KRAS/NRAS - Missense Mutation Detected&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;Output Added:&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;-------------&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;Name:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SurvivalPlot&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;Label:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Survival Curves&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;Template:&amp;nbsp;&amp;nbsp; Stat.Lifetest.Graphics.ProductLimitSurvival&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;Path:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Lifetest.ByGroup2.SurvivalPlot&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;-------------&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The above message was for the following BY group:&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HRAS/KRAS/NRAS Missense Status=HRAS/KRAS/NRAS - Missense Mutation not Detected&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: PROCEDURE LIFETEST used (Total process time):&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.54 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.19 seconds&lt;/DIV&gt;</description>
      <pubDate>Fri, 30 Nov 2018 06:33:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-remove-title-quot-Stratum-1-trt-2-quot-from-KM-plot-using/m-p/517379#M17503</guid>
      <dc:creator>yukixjxq2</dc:creator>
      <dc:date>2018-11-30T06:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove title "Stratum 1: _trt = 2" from KM plot using PROC LIFETEST PLOTS?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-remove-title-quot-Stratum-1-trt-2-quot-from-KM-plot-using/m-p/517490#M17504</link>
      <description>&lt;P&gt;You can suppress titles and do lots of cool output manipulations by using the ODS document.&amp;nbsp; In my tutorials, I always say that if you don't know about the ODS document, you should.&amp;nbsp; Cool stuff.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods document name=MyDoc (write);
ods graphics on;
proc lifetest data=sashelp.bmt plots=survival(strata=individual);
   time T * Status(0);
   strata Group;
run;

ods document close;

proc document name=MyDoc;
   list / levels=all;
quit;

proc document name=MyDoc;
   obstitle \Lifetest#1\Stratum1#1\SurvivalPlot#1;
   replay \Lifetest#1\Stratum1#1\SurvivalPlot#1;
   obstitle \Lifetest#1\Stratum2#1\SurvivalPlot#1;
   replay \Lifetest#1\Stratum2#1\SurvivalPlot#1;
   obstitle \Lifetest#1\Stratum3#1\SurvivalPlot#1;
   replay \Lifetest#1\Stratum3#1\SurvivalPlot#1;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 30 Nov 2018 14:32:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-remove-title-quot-Stratum-1-trt-2-quot-from-KM-plot-using/m-p/517490#M17504</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2018-11-30T14:32:14Z</dc:date>
    </item>
  </channel>
</rss>

