<?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: Editing output figure proc life failure curve in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Editing-output-figure-proc-life-failure-curve/m-p/690872#M33310</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16777"&gt;@WarrenKuhfeld&lt;/a&gt;&amp;nbsp; you are absolutly correct.&lt;/P&gt;
&lt;P&gt;i already tried to do that with a text editor but faced two problems:&lt;/P&gt;
&lt;P&gt;1. The word 'product limit' does not appear in the template file at all!&lt;/P&gt;
&lt;P&gt;2. Even when changing 'With Number of Subjects at Risk' using the same strategy in&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;_infile_ = tranwrd(_infile_, 'With Number of Subjects at Risk', 'Patients at risk');&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS will still force 'With Number of Subjects at Risk' to appear.&lt;/P&gt;
&lt;P&gt;i also tried 'ProvideSurvivalMacro' but no luck!&lt;/P&gt;
&lt;P&gt;The failure curves are causing the code 'to fail' &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 12 Oct 2020 02:03:32 GMT</pubDate>
    <dc:creator>ammarhm</dc:creator>
    <dc:date>2020-10-12T02:03:32Z</dc:date>
    <item>
      <title>Editing output figure proc life failure curve</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Editing-output-figure-proc-life-failure-curve/m-p/690833#M33306</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;i am trying o edit the failure curve obtained from proc life, see the code below:&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;DATA Have;
   input id	os_censor Sex $ Age duration os progress $ trt $;
   LABEL os = 'Overall Survival (months)'
   	progress = 'Progression'
	trt = 'Treatment'
	duration = 'Duration of Radiation';
   DATALINES;
1	1	M	40	44	20	No	B
2	1	F	45	46	16	Yes	A
3	1	F	40	32	20	No	B
4	1	F	47	32	23	No	B
5	0	M	41	25	22	No	B
6	1	M	54	35	13	No	B
7	1	M	48	50	9	Yes	A
8	1	M	36	33	12	Yes	B
9	0	F	49	51	8	Yes	A
10	1	M	49	52	10	Yes	A
11	1	M	44	35	12	No	A
12	1	M	49	50	8	Yes	A
13	1	M	44	44	14	Yes	A
14	1	M	50	31	10	Yes	A
15	1	M	53	40	15	No	B
16	0	M	52	29	20	Yes	B
17	1	F	46	45	5	Yes	A
18	1	F	37	44	11	Yes	A
19	1	M	49	46	13	No	B
20	1	M	42	31	11	No	A
;

run;

proc template;
   delete Stat.Lifetest.Graphics.ProductLimitFailure2;
   source Stat.Lifetest.Graphics.ProductLimitFailure2 / file='tpl.tpl';
quit;

data _null_;                                         
   infile 'tpl.tpl' end=eof;                        
   input;                                            
   if _n_ eq 1 then call execute('proc template;');  
   _infile_ = tranwrd(_infile_, 'viewmax=1',        
                                'viewmax=100');      
_infile_ = tranwrd(_infile_, '1-', '100-100*');
_infile_ = tranwrd(_infile_, 'Failure Probability', 'Percentage, failing');
   call execute(_infile_);                          
   if eof then call execute('quit;');               
run;                                             
proc template;
   source Stat.Lifetest.Graphics.ProductLimitFailure2 /
     store=sasuser.templat file='tplmod.tpl';
quit;

proc lifetest data=have atrisk plots=survival(atrisk  (atrisktickonly outside  )  failure test ) ;
strata trt;
time os*os_censor(0);
run;


&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I am still having two problems that I would appreciate help with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. I am unable to edit the title of the figure (Product limit Failure Curves With Number of Subjects at Risk), but have not been able to change that title.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. The y axis, while now converted to percentages, the axis label itself is not correct.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I appreciate your help with this..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Oct 2020 22:26:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Editing-output-figure-proc-life-failure-curve/m-p/690833#M33306</guid>
      <dc:creator>ammarhm</dc:creator>
      <dc:date>2020-10-11T22:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Editing output figure proc life failure curve</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Editing-output-figure-proc-life-failure-curve/m-p/690870#M33308</link>
      <description>&lt;P&gt;Solved the axis issue:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;                                       
   infile 'tpl.tpl' end=eof;                      
   input;                                           
   if _n_ eq 1 then call execute('proc template;'); 
   _infile_ = tranwrd(_infile_, 'viewmax=1',  'viewmax=100');     
_infile_ = tranwrd(_infile_, '1-', '100-100*');
&lt;STRONG&gt;_infile_ = tranwrd(_infile_, '(0 .2 .4 .6 .8 1.0)', '(0 20 40 60 80 100)');&lt;/STRONG&gt;
_infile_ = tranwrd(_infile_, 'Failure Probability', 'Percentage, Failing');
   call execute(_infile_);                         
   if eof then call execute('quit;');           
run; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But really not getting anywhere with the title issue&lt;/P&gt;
&lt;P&gt;Hope someone could help&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2020 01:47:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Editing-output-figure-proc-life-failure-curve/m-p/690870#M33308</guid>
      <dc:creator>ammarhm</dc:creator>
      <dc:date>2020-10-12T01:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: Editing output figure proc life failure curve</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Editing-output-figure-proc-life-failure-curve/m-p/690871#M33309</link>
      <description>&lt;P&gt;It looks like you were looking at something I wrote somewhere.&amp;nbsp; You are creating a file called tpl.tpl that contains the original SAS-provided templates. Look at that file with an ordinary text editor. Find the lines you want to change.&amp;nbsp; Then add the right translations to your DATA step to make the changes you want.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2020 01:48:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Editing-output-figure-proc-life-failure-curve/m-p/690871#M33309</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2020-10-12T01:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: Editing output figure proc life failure curve</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Editing-output-figure-proc-life-failure-curve/m-p/690872#M33310</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16777"&gt;@WarrenKuhfeld&lt;/a&gt;&amp;nbsp; you are absolutly correct.&lt;/P&gt;
&lt;P&gt;i already tried to do that with a text editor but faced two problems:&lt;/P&gt;
&lt;P&gt;1. The word 'product limit' does not appear in the template file at all!&lt;/P&gt;
&lt;P&gt;2. Even when changing 'With Number of Subjects at Risk' using the same strategy in&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;_infile_ = tranwrd(_infile_, 'With Number of Subjects at Risk', 'Patients at risk');&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS will still force 'With Number of Subjects at Risk' to appear.&lt;/P&gt;
&lt;P&gt;i also tried 'ProvideSurvivalMacro' but no luck!&lt;/P&gt;
&lt;P&gt;The failure curves are causing the code 'to fail' &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2020 02:03:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Editing-output-figure-proc-life-failure-curve/m-p/690872#M33310</guid>
      <dc:creator>ammarhm</dc:creator>
      <dc:date>2020-10-12T02:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Editing output figure proc life failure curve</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Editing-output-figure-proc-life-failure-curve/m-p/690873#M33311</link>
      <description>&lt;P&gt;I will try running it on Monday if you have not figured it out by then.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should know that text in graphs come from two places:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The graph template. This is the most obvious source.&lt;/LI&gt;
&lt;LI&gt;Message files. The term message file is not important. What is important is that sometimes the procedure decides at run time what text to display, because it cannot be known at procedure development time.&amp;nbsp; Then the text is sent to the template by using a dynamic variable.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;If you see a variable-name-looking-thing on a statement or in an option in a template instead of a literal text string, and you also see that name in a dynamic statement, then that is a dynamic variable. For ad hoc changes, replace the dynamic variable with a literal text string.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2020 02:10:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Editing-output-figure-proc-life-failure-curve/m-p/690873#M33311</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2020-10-12T02:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: Editing output figure proc life failure curve</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Editing-output-figure-proc-life-failure-curve/m-p/690945#M33312</link>
      <description>&lt;P&gt;Changing a dynamic variable METHOD to literal text:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;_infile_ = tranwrd(_infile_, 'entrytitle METHOD', 'entrytitle "MY-TITLE"');&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2020 12:26:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Editing-output-figure-proc-life-failure-curve/m-p/690945#M33312</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2020-10-12T12:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: Editing output figure proc life failure curve</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Editing-output-figure-proc-life-failure-curve/m-p/691103#M33320</link>
      <description>&lt;P&gt;Looks great &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16777"&gt;@WarrenKuhfeld&lt;/a&gt;&amp;nbsp;, this removed the 'product limit' part.&lt;/P&gt;
&lt;P&gt;Could you please also help with the 'With number of subjects at risk' part? It is the title under the main title, obtained with asking for the numbers at risk (atrisk)&lt;/P&gt;
&lt;P&gt;I have tired multiple combinations in vain:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;_infile_ = tranwrd(_infile_, ' entrytitle "With Number of Subjects at Risk" ', 'entrytitle "testing" ');

_infile_ = tranwrd(_infile_, 'With Number of Subjects at Risk"', 'testing');
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2020 23:33:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Editing-output-figure-proc-life-failure-curve/m-p/691103#M33320</guid>
      <dc:creator>ammarhm</dc:creator>
      <dc:date>2020-10-12T23:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: Editing output figure proc life failure curve</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Editing-output-figure-proc-life-failure-curve/m-p/691109#M33321</link>
      <description>&lt;P&gt;Solved&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;	_infile_ = tranwrd(_infile_, 'entrytitle SECONDTITLE', 'entrytitle "MY SUBTITLE"');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face="Consolas, Monaco, Andale Mono, Ubuntu Mono, monospace" color="#000000"&gt;&lt;SPAN style="font-size: 14.4px; white-space: pre; background-color: #f5f2f0;"&gt;Thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16777"&gt;@WarrenKuhfeld&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 00:41:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Editing-output-figure-proc-life-failure-curve/m-p/691109#M33321</guid>
      <dc:creator>ammarhm</dc:creator>
      <dc:date>2020-10-13T00:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: Editing output figure proc life failure curve</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Editing-output-figure-proc-life-failure-curve/m-p/691116#M33322</link>
      <description>&lt;P&gt;Everything you need is working now, right?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is nothing magical about any of this.&amp;nbsp; You simply look at the template and then edit it.&amp;nbsp; In the simplest case, you substitute one literal string for another. In your case, you substitute a literal string for a dynamic variable. Sometimes you add options or statements; sometimes you delete them. You can do all of this in an editor, but by using a DATA step, you have programmable/reproducible results.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 01:46:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Editing-output-figure-proc-life-failure-curve/m-p/691116#M33322</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2020-10-13T01:46:51Z</dc:date>
    </item>
  </channel>
</rss>

