<?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: KM-curve failure plot and modifying the y-axis - issues with macro in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/KM-curve-failure-plot-and-modifying-the-y-axis-issues-with-macro/m-p/544582#M17934</link>
    <description>&lt;P&gt;I provided a link to the documentation. In that example, there is the line&lt;/P&gt;
&lt;PRE class="xisDoc-code"&gt;%inc 'macros.tmp' / nosource;&lt;/PRE&gt;
&lt;P&gt;When you run that statement (or one like it), SAS runs the contents of the 'macros.tmp' file, which contains the definition of the macros and enables SAS to know what code to run when you execute the line&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;%ProvideSurvivalMacros&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;At some point, you downloaded the macro definitions and stored them in a file. I think you need to %INCLUDE that file before you run the example. If the file is "C:/temp/MySASMacro.txt" you would execute&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;%include&amp;nbsp;"C:/temp/MySASMacro.txt" / nosource;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Mar 2019 14:12:05 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2019-03-20T14:12:05Z</dc:date>
    <item>
      <title>KM-curve failure plot and modifying the y-axis - issues with macro</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/KM-curve-failure-plot-and-modifying-the-y-axis-issues-with-macro/m-p/541118#M17870</link>
      <description>&lt;P&gt;Hi everyone, I want to modify the y axis on my KM curve (failure). I found the macro online, but when I run below I get an error (attached) in the macro. Is there something I need to put before this? I'm really having a hard time with how macros work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%ProvideSurvivalMacros&lt;BR /&gt;%let yOptions = label="Failure"linearopts=(viewmin=0 viewmax=0.2 tickvaluelist=(0 .05 .1 .15 .2));&lt;BR /&gt;%CompileSurvivalTemplates&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc lifetest data = ammihc1 plots=survival(failure);&lt;BR /&gt;time survtime*outcome(0); run;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2019 15:29:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/KM-curve-failure-plot-and-modifying-the-y-axis-issues-with-macro/m-p/541118#M17870</guid>
      <dc:creator>KPCklebspn</dc:creator>
      <dc:date>2019-03-07T15:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: KM-curve failure plot and modifying the y-axis - issues with macro</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/KM-curve-failure-plot-and-modifying-the-y-axis-issues-with-macro/m-p/541162#M17871</link>
      <description>&lt;P&gt;Did you actually execute the source code that defines the macros?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_kaplan_sect016.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_self"&gt;The SAS/STAT documentation provides instructions about how to save the macro to a text file.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You can then %INCLUDE the contents&amp;nbsp;of the text file, which will define several macros, including the ones you mention.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, put a space before the LINEAROPTS keyword.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2019 17:39:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/KM-curve-failure-plot-and-modifying-the-y-axis-issues-with-macro/m-p/541162#M17871</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-03-07T17:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: KM-curve failure plot and modifying the y-axis - issues with macro</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/KM-curve-failure-plot-and-modifying-the-y-axis-issues-with-macro/m-p/544403#M17928</link>
      <description>&lt;P&gt;Hi Rick, thanks so much for the reply...pardon my ignorance but I am not super familiar with macros. What does "executing the source code that defines the macros" mean/how do I do that? Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 22:49:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/KM-curve-failure-plot-and-modifying-the-y-axis-issues-with-macro/m-p/544403#M17928</guid>
      <dc:creator>KPCklebspn</dc:creator>
      <dc:date>2019-03-19T22:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: KM-curve failure plot and modifying the y-axis - issues with macro</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/KM-curve-failure-plot-and-modifying-the-y-axis-issues-with-macro/m-p/544582#M17934</link>
      <description>&lt;P&gt;I provided a link to the documentation. In that example, there is the line&lt;/P&gt;
&lt;PRE class="xisDoc-code"&gt;%inc 'macros.tmp' / nosource;&lt;/PRE&gt;
&lt;P&gt;When you run that statement (or one like it), SAS runs the contents of the 'macros.tmp' file, which contains the definition of the macros and enables SAS to know what code to run when you execute the line&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;%ProvideSurvivalMacros&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;At some point, you downloaded the macro definitions and stored them in a file. I think you need to %INCLUDE that file before you run the example. If the file is "C:/temp/MySASMacro.txt" you would execute&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;%include&amp;nbsp;"C:/temp/MySASMacro.txt" / nosource;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2019 14:12:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/KM-curve-failure-plot-and-modifying-the-y-axis-issues-with-macro/m-p/544582#M17934</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-03-20T14:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: KM-curve failure plot and modifying the y-axis - issues with macro</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/KM-curve-failure-plot-and-modifying-the-y-axis-issues-with-macro/m-p/547438#M17967</link>
      <description>&lt;P&gt;Ok, so I've run this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;%let url = //support.sas.com/documentation/onlinedoc/stat/ex_code/151;&lt;BR /&gt;infile "http:&amp;amp;url/templft.html" device=url;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;file '/folders/myfolders/CPE/AMMI2019 reanalysis/KM macro.txt'; /*THIS LINE HAS MY FILE*/&lt;BR /&gt;retain pre 0;&lt;BR /&gt;input;&lt;BR /&gt;_infile_ = tranwrd(_infile_, '&amp;amp;amp;', '&amp;amp;');&lt;BR /&gt;_infile_ = tranwrd(_infile_, '&amp;amp;lt;' , '&amp;lt;');&lt;BR /&gt;if index(_infile_, '&amp;lt;/pre&amp;gt;') then pre = 0;&lt;BR /&gt;if pre then put _infile_;&lt;BR /&gt;if index(_infile_, '&amp;lt;pre&amp;gt;') then pre = 1;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;%inc "/folders/myfolders/CPE/AMMI2019 reanalysis/KM macro.txt" / nosource; /*THIS LINE HAS MY FILE*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%ProvideSurvivalMacros&lt;BR /&gt;%let yOptions = label="Failure" linearopts=(viewmin=0 viewmax=0.2 tickvaluelist=(0 .05 .1 .15 .2));&lt;BR /&gt;%CompileSurvivalTemplates&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The KM macro.txt file is a file with stuff from this link: &lt;A href="http://support.sas.com/documentation/onlinedoc/stat/ex_code/151/templft.html" target="_blank"&gt;http://support.sas.com/documentation/onlinedoc/stat/ex_code/151/templft.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The output when I run the above code is the PDF attached. No error...so I think it worked? How do I actually see the graph though?&lt;/P&gt;</description>
      <pubDate>Sat, 30 Mar 2019 20:06:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/KM-curve-failure-plot-and-modifying-the-y-axis-issues-with-macro/m-p/547438#M17967</guid>
      <dc:creator>KPCklebspn</dc:creator>
      <dc:date>2019-03-30T20:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: KM-curve failure plot and modifying the y-axis - issues with macro</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/KM-curve-failure-plot-and-modifying-the-y-axis-issues-with-macro/m-p/547439#M17968</link>
      <description>&lt;P&gt;Ok, so I've run this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;%let url = //support.sas.com/documentation/onlinedoc/stat/ex_code/151;&lt;BR /&gt;infile "http:&amp;amp;url/templft.html" device=url;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;file '/folders/myfolders/CPE/AMMI2019 reanalysis/KM macro.txt'; /*THIS LINE HAS MY FILE*/&lt;BR /&gt;retain pre 0;&lt;BR /&gt;input;&lt;BR /&gt;_infile_ = tranwrd(_infile_, '&amp;amp;amp;', '&amp;amp;');&lt;BR /&gt;_infile_ = tranwrd(_infile_, '&amp;amp;lt;' , '&amp;lt;');&lt;BR /&gt;if index(_infile_, '&amp;lt;/pre&amp;gt;') then pre = 0;&lt;BR /&gt;if pre then put _infile_;&lt;BR /&gt;if index(_infile_, '&amp;lt;pre&amp;gt;') then pre = 1;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;%inc "/folders/myfolders/CPE/AMMI2019 reanalysis/KM macro.txt" / nosource; /*THIS LINE HAS MY FILE*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%ProvideSurvivalMacros&lt;BR /&gt;%let yOptions = label="Failure" linearopts=(viewmin=0 viewmax=0.2 tickvaluelist=(0 .05 .1 .15 .2));&lt;BR /&gt;%CompileSurvivalTemplates&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The KM macro.txt file is a file with stuff from this link: &lt;A href="http://support.sas.com/documentation/onlinedoc/stat/ex_code/151/templft.html" target="_blank"&gt;http://support.sas.com/documentation/onlinedoc/stat/ex_code/151/templft.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The output when I run the above code is the PDF attached. No error...so I think it worked? How do I actually see the graph though?&lt;/P&gt;</description>
      <pubDate>Sat, 30 Mar 2019 20:06:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/KM-curve-failure-plot-and-modifying-the-y-axis-issues-with-macro/m-p/547439#M17968</guid>
      <dc:creator>KPCklebspn</dc:creator>
      <dc:date>2019-03-30T20:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: KM-curve failure plot and modifying the y-axis - issues with macro</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/KM-curve-failure-plot-and-modifying-the-y-axis-issues-with-macro/m-p/547451#M17969</link>
      <description>&lt;P&gt;Now run PROC LIFETEST. It will use the survival templates that you just compiled.&amp;nbsp;&lt;A href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_kaplan_sect015.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_self"&gt;The SAS/STAT documentation has many examples.&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Mar 2019 22:43:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/KM-curve-failure-plot-and-modifying-the-y-axis-issues-with-macro/m-p/547451#M17969</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-03-30T22:43:14Z</dc:date>
    </item>
  </channel>
</rss>

