<?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: Kaplan Meier Curve doesn't show top and bottom axis value in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Kaplan-Meier-Curve-doesn-t-show-top-and-bottom-axis-value/m-p/837556#M331175</link>
    <description>Be sure to delete the modified templates when you are done to avoid having problems next time. The documentation shows you how.</description>
    <pubDate>Sun, 09 Oct 2022 10:22:18 GMT</pubDate>
    <dc:creator>WarrenKuhfeld</dc:creator>
    <dc:date>2022-10-09T10:22:18Z</dc:date>
    <item>
      <title>Kaplan Meier Curve doesn't show top and bottom axis value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Kaplan-Meier-Curve-doesn-t-show-top-and-bottom-axis-value/m-p/837505#M331141</link>
      <description>&lt;P&gt;Dear all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I used proc lifetest to plot Kaplan-Meier curve and found the curve only showed between 0.25 and 0.75.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Besides, the Y-Axis automatically becomes "CIF" rather than "survival probability". (as the followed screenshot)&lt;/P&gt;&lt;P&gt;The code I test is very basic as followed:&lt;/P&gt;&lt;P&gt;PROC LIFETEST DATA=MYEL METHOD=KM;&lt;BR /&gt;TIME DUR*STATUS(0);&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using other codes and dataset which performed normally before. I also tried copying the code and data from SAS tutorial directly. I even tried uninstalling and reinstalling the SAS program.&amp;nbsp; But it continued to show this way.&lt;/P&gt;&lt;P&gt;If everyone used to face this problem, please let me know how to solve it. Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yechen_0-1665206266734.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76026i1516F928E5469F06/image-size/medium?v=v2&amp;amp;px=400" role="button" title="yechen_0-1665206266734.png" alt="yechen_0-1665206266734.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Oct 2022 05:27:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Kaplan-Meier-Curve-doesn-t-show-top-and-bottom-axis-value/m-p/837505#M331141</guid>
      <dc:creator>yechen</dc:creator>
      <dc:date>2022-10-08T05:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: Kaplan Meier Curve doesn't show top and bottom axis value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Kaplan-Meier-Curve-doesn-t-show-top-and-bottom-axis-value/m-p/837507#M331143</link>
      <description>&lt;P&gt;What happens if you add this to your Proc Lifetest statement:&lt;/P&gt;
&lt;PRE&gt;plots=survival(nocensor )&lt;/PRE&gt;
&lt;P&gt;There is an entire section in the documentation on modifying and controlling these plots taking maybe 40 or 50 pages. Quite often there will be multiple ways to accomplish something.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can start here for more ideas:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_kaplan_toc.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_kaplan_toc.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note: without your data we can't test code.&lt;/P&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;</description>
      <pubDate>Sat, 08 Oct 2022 07:47:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Kaplan-Meier-Curve-doesn-t-show-top-and-bottom-axis-value/m-p/837507#M331143</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-10-08T07:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: Kaplan Meier Curve doesn't show top and bottom axis value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Kaplan-Meier-Curve-doesn-t-show-top-and-bottom-axis-value/m-p/837528#M331159</link>
      <description>&lt;P&gt;Thank you for the repley. I used the code "&lt;CODE class=""&gt;plots=survival(nocensor )&lt;/CODE&gt;" you suggested. But the graph still only showed between 0.25 and 0.75. The followed are the graph and the codes I tested. I've tried some steps in the documents to force the graph show top limit to 1.0 but it doesn't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yechen_0-1665244617923.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76029i78EB6E0B1F40DDDE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="yechen_0-1665244617923.png" alt="yechen_0-1665244617923.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;DATA MYEL;
	INPUT DUR STATUS TREAT RENAL;
	DATALINES;
8  1   1   1
180  1   2   0
632  1   2   0
852  0   1   0
52  1   1   1
2240  0   2   0
220  1   1   0
63  1   1   1
195  1   2   0
76  1   2   0
70  1   2   0
8  1   1   0
13  1   2   1
1990  0   2   0
1976  0   1   0
18  1   2   1
700  1   2   0
1296  0   1   0
1460  0   1   0
210  1   2   0
63  1   1   1
1328  0   1   0
1296  1   2   0
365  0   1   0
23  1   2   1
     ;
RUN;
*Kaplain-Merier Estimation;
PROC LIFETEST DATA=MYEL METHOD=KM plots=survival(nocensor );
	TIME DUR*STATUS(0);
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Oct 2022 16:00:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Kaplan-Meier-Curve-doesn-t-show-top-and-bottom-axis-value/m-p/837528#M331159</guid>
      <dc:creator>yechen</dc:creator>
      <dc:date>2022-10-08T16:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: Kaplan Meier Curve doesn't show top and bottom axis value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Kaplan-Meier-Curve-doesn-t-show-top-and-bottom-axis-value/m-p/837536#M331166</link>
      <description>&lt;P&gt;Interestingly when I run the code you posted it shows the full axis.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wonder if you modified the options earlier?&lt;/P&gt;
&lt;P&gt;Here is how you can customize the axis:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename demo temp;

data _null_;
   %let url = //support.sas.com/documentation/onlinedoc/stat/ex_code/142;
   infile "http:&amp;amp;url/templft.html" device=url;

   file demo;
   retain pre 0;
   input;
   _infile_ = tranwrd(_infile_, '&amp;amp;amp;', '&amp;amp;');
   _infile_ = tranwrd(_infile_, '&amp;amp;lt;' , '&amp;lt;');
   if index(_infile_, '&amp;lt;/pre&amp;gt;') then pre = 0;
   if pre then put _infile_;
   if index(_infile_, '&amp;lt;pre&amp;gt;')  then pre = 1;
run;

%inc demo / nosource;

%ProvideSurvivalMacros;

%let yOptions = label="My Custom Label"
                linearopts=(viewmin=0 viewmax=1
                            tickvaluelist=(0 .1 .25 .5 .75 .9 1));

%CompileSurvivalTemplates;

*Kaplain-Merier Estimation;
PROC LIFETEST DATA=MYEL METHOD=KM plots=survival(nocensor );
	TIME DUR*STATUS(0);
RUN;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The first part downloads the macros from SAS that allow for easy customization and then you can set the options list.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Oct 2022 19:50:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Kaplan-Meier-Curve-doesn-t-show-top-and-bottom-axis-value/m-p/837536#M331166</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-10-08T19:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: Kaplan Meier Curve doesn't show top and bottom axis value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Kaplan-Meier-Curve-doesn-t-show-top-and-bottom-axis-value/m-p/837549#M331173</link>
      <description>&lt;P&gt;Thank you. It works!!! I appreciate it.&lt;/P&gt;&lt;P&gt;I am not aware that I changed any options or setting.&lt;/P&gt;&lt;P&gt;But maybe I changed unintentionally when I tried coding before.&lt;/P&gt;</description>
      <pubDate>Sun, 09 Oct 2022 03:17:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Kaplan-Meier-Curve-doesn-t-show-top-and-bottom-axis-value/m-p/837549#M331173</guid>
      <dc:creator>yechen</dc:creator>
      <dc:date>2022-10-09T03:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: Kaplan Meier Curve doesn't show top and bottom axis value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Kaplan-Meier-Curve-doesn-t-show-top-and-bottom-axis-value/m-p/837556#M331175</link>
      <description>Be sure to delete the modified templates when you are done to avoid having problems next time. The documentation shows you how.</description>
      <pubDate>Sun, 09 Oct 2022 10:22:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Kaplan-Meier-Curve-doesn-t-show-top-and-bottom-axis-value/m-p/837556#M331175</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2022-10-09T10:22:18Z</dc:date>
    </item>
  </channel>
</rss>

