<?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: Further customization of Kaplan-Meier Curve in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Further-customization-of-Kaplan-Meier-Curve/m-p/421858#M14507</link>
    <description>&lt;P&gt;I can help you more on Monday when I am in the office.&amp;nbsp; I recently added an example somewhere that shows how to display percentages.&amp;nbsp; It might have been in that&amp;nbsp;chapter or it might have been in&amp;nbsp;my PharmaSUG submission for next year.&amp;nbsp; Either way, I can extract it and share it.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;What is the SurvivalTable?&amp;nbsp; There are lots of examples of the at risk table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can change the macro variables (yoptions and xoptions)&amp;nbsp; to display grids.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Different installations and methods of running SAS have different permissions.&amp;nbsp; I have not heard about people having trouble deleting something in sasuser, but that does not mean much.&amp;nbsp; I can't help you much with that one.&amp;nbsp; There are ways to modify template search paths and make customized libraries that are well documented.&amp;nbsp; You can also store modified templates in Work.&amp;nbsp; I can easily help you with that when I am in the office on Monday.&lt;/P&gt;</description>
    <pubDate>Sun, 17 Dec 2017 18:07:23 GMT</pubDate>
    <dc:creator>WarrenKuhfeld</dc:creator>
    <dc:date>2017-12-17T18:07:23Z</dc:date>
    <item>
      <title>Further customization of Kaplan-Meier Curve</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Further-customization-of-Kaplan-Meier-Curve/m-p/421857#M14506</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have three question about customizing the kaplan meier curve. I have read the&amp;nbsp;"User’s Guide Customizing the Kaplan-Meier Survival Plot" and I have three questions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. How can I event probability in percent instead of values lower than 1? Can I&amp;nbsp;using the template modification or format a value somewhere? I used to do this by exporting the survival plot data, formatting it, and then plotting it in SGPLOT.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Can I include the SurvivalTable in the kaplan-meier curve? I tried looking at the macro code, but I didn't find any place where I can modify it for such purpose&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Can I add grids on the x or y axis?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4. When I try to delete the template the edited, I receive the following error message. I am using SAS Online Studio. Any ideas?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ERROR: Write access to member SASUSER.TEMPLAT.ITEMSTOR is denied.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Dec 2017 18:00:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Further-customization-of-Kaplan-Meier-Curve/m-p/421857#M14506</guid>
      <dc:creator>Ubai</dc:creator>
      <dc:date>2017-12-17T18:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: Further customization of Kaplan-Meier Curve</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Further-customization-of-Kaplan-Meier-Curve/m-p/421858#M14507</link>
      <description>&lt;P&gt;I can help you more on Monday when I am in the office.&amp;nbsp; I recently added an example somewhere that shows how to display percentages.&amp;nbsp; It might have been in that&amp;nbsp;chapter or it might have been in&amp;nbsp;my PharmaSUG submission for next year.&amp;nbsp; Either way, I can extract it and share it.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;What is the SurvivalTable?&amp;nbsp; There are lots of examples of the at risk table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can change the macro variables (yoptions and xoptions)&amp;nbsp; to display grids.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Different installations and methods of running SAS have different permissions.&amp;nbsp; I have not heard about people having trouble deleting something in sasuser, but that does not mean much.&amp;nbsp; I can't help you much with that one.&amp;nbsp; There are ways to modify template search paths and make customized libraries that are well documented.&amp;nbsp; You can also store modified templates in Work.&amp;nbsp; I can easily help you with that when I am in the office on Monday.&lt;/P&gt;</description>
      <pubDate>Sun, 17 Dec 2017 18:07:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Further-customization-of-Kaplan-Meier-Curve/m-p/421858#M14507</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-12-17T18:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: Further customization of Kaplan-Meier Curve</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Further-customization-of-Kaplan-Meier-Curve/m-p/421866#M14508</link>
      <description>&lt;P&gt;Thanks Warren for the quick response. Take your time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the survival table, I meant the external table with event information.&lt;/P&gt;</description>
      <pubDate>Sun, 17 Dec 2017 19:00:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Further-customization-of-Kaplan-Meier-Curve/m-p/421866#M14508</guid>
      <dc:creator>Ubai</dc:creator>
      <dc:date>2017-12-17T19:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: Further customization of Kaplan-Meier Curve</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Further-customization-of-Kaplan-Meier-Curve/m-p/421869#M14509</link>
      <description>&lt;P&gt;If the graph on page 821 of&amp;nbsp;&lt;A href="https://support.sas.com/documentation/onlinedoc/stat/131/kaplan.pdf" target="_blank"&gt;https://support.sas.com/documentation/onlinedoc/stat/131/kaplan.pdf&lt;/A&gt; does not help,&amp;nbsp;tell me more precisely what table you want displayed.&amp;nbsp; Remember, I am a graph and ODS guy (and a lot of other things), but I am not a researcher in health sciences,&amp;nbsp;nor did I develop LIFETEST, so you have to explain it in concrete terms.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Dec 2017 19:24:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Further-customization-of-Kaplan-Meier-Curve/m-p/421869#M14509</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-12-17T19:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Further customization of Kaplan-Meier Curve</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Further-customization-of-Kaplan-Meier-Curve/m-p/421998#M14512</link>
      <description>&lt;P&gt;The percentage example I have is for the failure plot.&amp;nbsp; It turns out that is the easier case.&amp;nbsp; What you need to do is plot a function of the original variables, eval(100 * &lt;EM&gt;original-var&lt;/EM&gt;). You also need to change some ticks, and so on.&amp;nbsp; It is easier in the failure plot because there is already an eval(1-&lt;EM&gt;original-var&lt;/EM&gt;), so you can make the change based on finding the "1-".&amp;nbsp; If you want to make the change to the survival plot, it will take some more work.&amp;nbsp; I'll post something more later.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2017 15:02:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Further-customization-of-Kaplan-Meier-Curve/m-p/421998#M14512</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-12-18T15:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: Further customization of Kaplan-Meier Curve</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Further-customization-of-Kaplan-Meier-Curve/m-p/422014#M14513</link>
      <description>&lt;P&gt;Here is how you can convert from proportions to percentages.&amp;nbsp; I use a DATA step to edit the template replacing each Y variable by an expression.&amp;nbsp; Furthermore, I replace the ticks, axis label, and maximum value on the Y axis. I also added grids.&lt;/P&gt;
&lt;PRE&gt;ods graphics on;&lt;BR /&gt;&lt;BR /&gt;proc template;&lt;BR /&gt; delete Stat.Lifetest.Graphics.ProductLimitSurvival;&lt;BR /&gt; source Stat.Lifetest.Graphics.ProductLimitSurvival / file='temp.tmp';&lt;BR /&gt;quit; &lt;BR /&gt;&lt;BR /&gt;proc lifetest data=sashelp.BMT plots=survival(cb=hw test);&lt;BR /&gt; ods select survivalplot;&lt;BR /&gt; time T * Status(0);&lt;BR /&gt; strata Group;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data _null_;&lt;BR /&gt; length var1 var2 $ 40;&lt;BR /&gt; infile 'temp.tmp' end=eof;&lt;BR /&gt; input;&lt;BR /&gt; if _n_ eq 1 then call execute('proc template;');&lt;BR /&gt; if left(_infile_) =: 'bandplot' then do;&lt;BR /&gt; var1 = scan(scan(_infile_, 2, '='), 1);&lt;BR /&gt; var2 = scan(scan(_infile_, 3, '='), 1);&lt;BR /&gt; put var1= var2=;&lt;BR /&gt; _infile_ = tranwrd(_infile_, trim(var1), cats('eval(100*',var1,')'));&lt;BR /&gt; _infile_ = tranwrd(_infile_, trim(var2), cats('eval(100*',var2,')'));&lt;BR /&gt; end;&lt;BR /&gt; if left(_infile_) =: 'scatterplot' or left(_infile_) =: 'stepplot' then do;&lt;BR /&gt; var1 = scan(scan(_infile_, 2, '='), 1);&lt;BR /&gt; put var1=;&lt;BR /&gt; _infile_ = tranwrd(_infile_, trim(var1), cats('eval(100*',var1,')'));&lt;BR /&gt; end;&lt;BR /&gt; _infile_ = tranwrd(_infile_, '0 .2 .4 .6 .8 1.0', '0 20 40 60 80 100');&lt;BR /&gt; _infile_ = tranwrd(_infile_, 'viewmax=1', 'viewmax=100');&lt;BR /&gt; _infile_ = tranwrd(_infile_, 'Survival Probability', 'Survival Percentage');&lt;BR /&gt; _infile_ = tranwrd(_infile_, 'yaxisopts=(', 'yaxisopts=(grid_display=on ');&lt;BR /&gt; call execute(_infile_);&lt;BR /&gt; if eof then call execute('quit;');&lt;BR /&gt;run; &lt;BR /&gt;&lt;BR /&gt;proc lifetest data=sashelp.BMT plots=survival(cb=hw test);&lt;BR /&gt; ods select survivalplot;&lt;BR /&gt; time T * Status(0);&lt;BR /&gt; strata Group;&lt;BR /&gt;run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2017 15:54:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Further-customization-of-Kaplan-Meier-Curve/m-p/422014#M14513</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-12-18T15:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Further customization of Kaplan-Meier Curve</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Further-customization-of-Kaplan-Meier-Curve/m-p/422794#M14560</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16777"&gt;@WarrenKuhfeld&lt;/a&gt;&amp;nbsp;and thank you for the quick response.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1. I used to plot the survival curve in SGPlot before reading your chapter on customizing the kaplan-meier curve. I was able to present event probability in percent by just adding a format to the survival estimates data I get out of the PROC LIFETEST.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. I can't try your solution.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;I am receiving the following error message when trying to delete the template, which is probably&amp;nbsp;happening because I am using SAS Online Studio.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ERROR: Insufficient authorization to access /pbr/biconfig/940/Lev1/SASApp/temp.tmp.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3.&amp;nbsp;The table I wanted to include inside my graph is the one you would get using the&amp;nbsp;%SurvivalSummaryTable (i.e. from page 824). There is some space in my graph that allows the table to be included in the graph. I tried to solve this issue by expanding the&amp;nbsp; %macro StmtsBottom macro to include further variables, instead of manipulating the %survivalsummaryTable. However, I am receiving too many errors.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro StmtsBottom;
dynamic %do i = 1 %to 2; StrVal&amp;amp;i NObs&amp;amp;i NEvent&amp;amp;i %end;;
layout gridded / columns=7 border=TRUE autoalign=(TopRight);
entry ""; 
entry "Subjects"; 
entry "Event"; 
entry "Censored"; 
entry "Survival"; 
entry PctMedianConfid; 
entry halign=left "CL";
%do i = 1 %to 2;
%let t = / textattrs=GraphData&amp;amp;i;
entry halign=left Strval&amp;amp;i &amp;amp;t; 
entry NObs&amp;amp;i &amp;amp;t; 
entry NEvent&amp;amp;i &amp;amp;t; 
entry eval(NObs&amp;amp;i) &amp;amp;t;
entry eval(put(Median&amp;amp;i,&amp;amp;fmt)) &amp;amp;t;
entry eval(put(LowerMedian&amp;amp;i,&amp;amp;fmt)) &amp;amp;t;
entry eval(put(UpperMedian&amp;amp;i,&amp;amp;fmt)) &amp;amp;t;
%end;
endlayout;
%mend;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 17:21:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Further-customization-of-Kaplan-Meier-Curve/m-p/422794#M14560</guid>
      <dc:creator>Ubai</dc:creator>
      <dc:date>2017-12-20T17:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: Further customization of Kaplan-Meier Curve</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Further-customization-of-Kaplan-Meier-Curve/m-p/422801#M14561</link>
      <description>&lt;P&gt;&lt;A href="http://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_ods_overview16.htm&amp;amp;docsetVersion=14.2&amp;amp;locale=en" target="_blank"&gt;http://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_ods_overview16.htm&amp;amp;docsetVersion=14.2&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_ods_overview18.htm&amp;amp;docsetVersion=14.2&amp;amp;locale=en" target="_blank"&gt;http://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_ods_overview18.htm&amp;amp;docsetVersion=14.2&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See if either of these help.&amp;nbsp; What is your template search path?&amp;nbsp; Can you make it include work?&amp;nbsp; The links I include explain. Your template search path might be configured in some way other than the customary default.&amp;nbsp; I can look at what you submitted in more detail later, but I have to be somewhere soon.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 17:36:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Further-customization-of-Kaplan-Meier-Curve/m-p/422801#M14561</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-12-20T17:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Further customization of Kaplan-Meier Curve</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Further-customization-of-Kaplan-Meier-Curve/m-p/422806#M14562</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; 61         ods path show;
 Current ODS PATH list is: 
 
 1. WORK.TEMPLAT(UPDATE) 
 2. SASUSER.TEMPLAT(READ) 
 3. SASHELP.TMPLMST(READ) &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and when I try to delete the template&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; 60         proc template;
 61          delete Stat.Lifetest.Graphics.ProductLimitSurvival;
 WARNING: Path 'Stat.Lifetest.Graphics.ProductLimitSurvival' does not exist!
 NOTE: Could not delete 'Stat.Lifetest.Graphics.ProductLimitSurvival' from template store!
 62          source Stat.Lifetest.Graphics.ProductLimitSurvival / file='Lifetest.tmp';
 ERROR: Insufficient authorization to access /pbr/biconfig/940/Lev1/SASApp/Lifetest.tmp.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Dec 2017 17:54:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Further-customization-of-Kaplan-Meier-Curve/m-p/422806#M14562</guid>
      <dc:creator>Ubai</dc:creator>
      <dc:date>2017-12-20T17:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: Further customization of Kaplan-Meier Curve</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Further-customization-of-Kaplan-Meier-Curve/m-p/422849#M14563</link>
      <description>&lt;P&gt;I run under a Unix system where I can create a file like that.&amp;nbsp; File access, creation, permissions, directories, etc. can vary substantially from one system to another.&amp;nbsp; It appears that your default working directory is not someplace&amp;nbsp;to which you can write.&amp;nbsp; Do you have any other examples where you have used SAS to make a file?&amp;nbsp; Can you follow the lead of those?&amp;nbsp; Maybe use a C: path if you are on Windows.&amp;nbsp; There are many people in SAS Communities who can speak more intelligently than me about how you should specify a path to create a file.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 19:23:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Further-customization-of-Kaplan-Meier-Curve/m-p/422849#M14563</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-12-20T19:23:07Z</dc:date>
    </item>
  </channel>
</rss>

