<?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: Proc LifeTest X Axis Starting Point in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/637494#M189483</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/140136"&gt;@Denali&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to create a Kaplan-Mier Plot with x-axis starting at Year 5 instead of Year 0 because all my patients have survived at least 5 years. I do not want to present the flat line from Year 0 to Year 5. Below is my code and could anyone please tell me how to make the x-axis &lt;A href="https://aboutpetguide.com/best-automatic-cat-feeders/" target="_self"&gt;&lt;FONT color="#333333"&gt;about&lt;/FONT&gt;&lt;/A&gt; starting at 5 instead of 0?&amp;nbsp; Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ods graphics on / width = 6 in height = in border = off ;&lt;BR /&gt;ods graphics on/ imagefmt = tiff imagename = "Figure_AKI_Survivors" reset = index;&lt;BR /&gt;ods listing image_dpi = 300 style = axis_wall style=StatColor;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc lifetest data=two plots=survival(test atrisk =5 to 15 by 2.5)&lt;BR /&gt;/* ods select SurvivalPlot;*/&lt;BR /&gt;outsur=survival2;&lt;BR /&gt;time Survive_year*death(0);&lt;BR /&gt;label Survive_year='Time (Years)';&lt;BR /&gt;strata AKI;&lt;BR /&gt;ods output SurvivalPlot = graph;&lt;BR /&gt;run;&lt;BR /&gt;ods graphics off;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I am having difficulty adjusting the X-axis range for a survival plot using PROC LIFETEST&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rather than starting at "0", I want to start at "12000" instead by intervals of "1000"&lt;/P&gt;&lt;P&gt;any solution ?&lt;/P&gt;</description>
    <pubDate>Sat, 04 Apr 2020 03:55:52 GMT</pubDate>
    <dc:creator>enatx</dc:creator>
    <dc:date>2020-04-04T03:55:52Z</dc:date>
    <item>
      <title>Proc LifeTest X Axis Starting Point</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/636751#M189214</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to create a Kaplan-Mier Plot with x-axis starting at Year 5 instead of Year 0 because all my patients have survived at least 5 years. I do not want to present the flat line from Year 0 to Year 5. Below is my code and could anyone please tell me how to make the x-axis starting at 5 instead of 0?&amp;nbsp; Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ods graphics on / width = 6 in height = in border = off ;&lt;BR /&gt;ods graphics on/ imagefmt = tiff imagename = "Figure_AKI_Survivors" reset = index;&lt;BR /&gt;ods listing image_dpi = 300 style = axis_wall style=StatColor;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc lifetest data=two plots=survival(test atrisk =5 to 15 by 2.5)&lt;BR /&gt;/* ods select SurvivalPlot;*/&lt;BR /&gt;outsur=survival2;&lt;BR /&gt;time Survive_year*death(0);&lt;BR /&gt;label Survive_year='Time (Years)';&lt;BR /&gt;strata AKI;&lt;BR /&gt;ods output SurvivalPlot = graph;&lt;BR /&gt;run;&lt;BR /&gt;ods graphics off;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 03:36:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/636751#M189214</guid>
      <dc:creator>Denali</dc:creator>
      <dc:date>2020-04-02T03:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: Proc LifeTest X Axis Starting Point</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/636753#M189215</link>
      <description>Do you need to truncate the graph or just change the x axis to start at 0? Two very different things.</description>
      <pubDate>Thu, 02 Apr 2020 03:35:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/636753#M189215</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-04-02T03:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Proc LifeTest X Axis Starting Point</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/636754#M189216</link>
      <description>&lt;P&gt;I need to change the x-axis to start at year 5 instead of starting at 0.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 03:37:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/636754#M189216</guid>
      <dc:creator>Denali</dc:creator>
      <dc:date>2020-04-02T03:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: Proc LifeTest X Axis Starting Point</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/636755#M189217</link>
      <description>&lt;P&gt;Because nobody died at year 0-5 and they started dying from year 5-15. So I am hoping not to show year 0-5 in the graph.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 03:43:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/636755#M189217</guid>
      <dc:creator>Denali</dc:creator>
      <dc:date>2020-04-02T03:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: Proc LifeTest X Axis Starting Point</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/636757#M189218</link>
      <description>&lt;P&gt;Sounds like you want it truncated. I see two options, subtract 5 from your time and then format the x axis (proc format) to show the actual time.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or build a custom plot by capturing the data from LIFETEST.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2018/02/19/survival-plot-twist-using-sgplot-procedure/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2018/02/19/survival-plot-twist-using-sgplot-procedure/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The blog post shows how to graph it, you can customize the XAXIS statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You capture your data by adding the following line before the code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods output survivalPlotData = survGraphData;

*your proc lifetest code;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Apr 2020 03:45:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/636757#M189218</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-04-02T03:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Proc LifeTest X Axis Starting Point</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/636758#M189219</link>
      <description>&lt;P&gt;For option 1, I substracted 5 for time (year) variable:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data two_a;&lt;BR /&gt;set two;&lt;BR /&gt;KM_year = survive_year - 5;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I format it back to the real number? All the numbers are with many decimal now. Please see below output:&lt;/P&gt;&lt;DIV class="branch"&gt;&lt;DIV align="center"&gt;KM_year&lt;BR /&gt;&lt;TABLE cellspacing="0" cellpadding="5"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;8.6110&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11.1041&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10.3452&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7.3644&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4.7753&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11.8055&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0.9507&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4.5096&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1.5123&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11.4164&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7.2548&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11.2082&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;8.9123&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3.6082&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11.0055&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6.6795&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6.5233&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2.9863&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0.6438&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2.7890&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7.2740&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1.2795&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 03:58:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/636758#M189219</guid>
      <dc:creator>Denali</dc:creator>
      <dc:date>2020-04-02T03:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: Proc LifeTest X Axis Starting Point</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/636760#M189220</link>
      <description>Create a format and apply it to the axis. You may need to modify the template (check the macros in the documentation). &lt;BR /&gt;&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_kaplan_toc.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_kaplan_toc.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Although it seems harder, the SGPLOT is actually the easier solution here.</description>
      <pubDate>Thu, 02 Apr 2020 04:16:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/636760#M189220</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-04-02T04:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: Proc LifeTest X Axis Starting Point</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/636934#M189299</link>
      <description>&lt;P&gt;I am attachinig my graph on the post.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking at the page of "Modifying the Axis":&amp;nbsp;&lt;A href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_kaplan_sect016.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en"&gt;https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_kaplan_sect016.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%ProvideSurvivalMacros&lt;/P&gt;&lt;P&gt;%let yOptions = label="Survival"&lt;BR /&gt;linearopts=(viewmin=0 viewmax=1;&lt;BR /&gt;%let xOptions = label="Survival Year"&lt;BR /&gt;linearopts=(viewmin=5 viewmax=20&lt;BR /&gt;tickvaluelist=(5 10 15 20));&lt;BR /&gt;&lt;BR /&gt;%CompileSurvivalTemplates&lt;/P&gt;&lt;P&gt;proc lifetest data=two plots=survival(cb=hw test);&lt;BR /&gt;time Survive_year*death(0);&lt;BR /&gt;strata AKI;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But this is only for changing the ticks, not the X axis starting point. I still don't know how to do it.......&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 17:17:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/636934#M189299</guid>
      <dc:creator>Denali</dc:creator>
      <dc:date>2020-04-02T17:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: Proc LifeTest X Axis Starting Point</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/636975#M189312</link>
      <description>&lt;P&gt;Did you try the ODS and SGPLOT approach?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Run PROC LIFETEST with the modification I suggested&lt;/P&gt;
&lt;P&gt;2. Copy and paste code from blog post, change variable names to match yours&lt;/P&gt;
&lt;P&gt;3. Ensure graph matches output from PROC LIFETEST&lt;/P&gt;
&lt;P&gt;4. Change Axis using an XAXIS notation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Those are the steps you need to follow. It's exactly what I would do if I was trying to make an example for you to follow.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 17:32:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/636975#M189312</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-04-02T17:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: Proc LifeTest X Axis Starting Point</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/636985#M189319</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran below code per your suggestion:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ods output survivalPlotData = survGraphData;&lt;BR /&gt;proc lifetest data=two plots=survival ;&lt;BR /&gt;time Survive_year*death(0);&lt;BR /&gt;strata AKI;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it gave me the error message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;NOTE: The LOGLOG transform is used to compute the confidence limits for the quartiles of the&lt;BR /&gt;survivor distribution. To suppress using this transform, specify CONFTYPE=LINEAR in the&lt;BR /&gt;PROC LIFETEST statement.&lt;BR /&gt;NOTE: Graph's name, LIFETEST, changed to LIFETES1. LIFETEST is already used or not a valid SAS&lt;BR /&gt;name.&lt;BR /&gt;NOTE: Graph's name, LIFETEST, changed to LIFETES1. LIFETEST is already used or not a valid SAS&lt;BR /&gt;name.&lt;BR /&gt;NOTE: 29352 bytes written to C:\Users\LinI1\AppData\Local\Temp\SAS Temporary&lt;BR /&gt;Files\_TD7508_WBSTE046_\lifetest1.png.&lt;BR /&gt;WARNING: Output 'survivalPlotData' was not created. Make sure that the output object name,&lt;BR /&gt;label, or path is spelled correctly. Also, verify that the appropriate procedure&lt;BR /&gt;options are used to produce the requested output object. For example, verify that&lt;BR /&gt;the NOPRINT option is not used.&lt;BR /&gt;NOTE: PROCEDURE LIFETEST used (Total process time):&lt;BR /&gt;real time 0.56 seconds&lt;BR /&gt;cpu time 0.46 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 17:48:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/636985#M189319</guid>
      <dc:creator>Denali</dc:creator>
      <dc:date>2020-04-02T17:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Proc LifeTest X Axis Starting Point</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/637000#M189323</link>
      <description>If you download the code in the blog post referenced it has the fully worked example INCLUDING the PROC LIFETEST portion and the graphing code. It's at the bottom of the page. &lt;BR /&gt;&lt;BR /&gt;There was a mistake in my code, I added the word DATA to the , it should be:&lt;BR /&gt;ods output survivalplot = survivalplotData;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ods output Survivalplot=SurvivalPlotData;</description>
      <pubDate>Thu, 02 Apr 2020 18:26:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/637000#M189323</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-04-02T18:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: Proc LifeTest X Axis Starting Point</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/637003#M189325</link>
      <description>&lt;P&gt;Here's the example from the blog with the timeline starts from 500 instead of 0.&lt;/P&gt;
&lt;P&gt;The XAXIS statement controls the axis limits and graphs.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can uncomment the XAXISTABLE if you want the table at the bottom as well.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let gpath=/folders/myfolders/;

%let w=5in;
%let h=3in;
%let dpi=300;


/*--This sample uses data from sample 49_2_1--*/
proc format;
   value risk 1='ALL' 2='AML-Low Risk' 3='AML-High Risk';

/*--Data for proc LIFETEST sample 49_2_1--*/
data BMT;
   input Group T Status @@;
   format Group risk.;
   label T='Disease Free Time';
   datalines;
1 2081 0 1 1602 0 1 1496 0 1 1462 0 1 1433 0
1 1377 0 1 1330 0 1  996 0 1  226 0 1 1199 0
1 1111 0 1  530 0 1 1182 0 1 1167 0 1  418 1
1  383 1 1  276 1 1  104 1 1  609 1 1  172 1
1  487 1 1  662 1 1  194 1 1  230 1 1  526 1
1  122 1 1  129 1 1   74 1 1  122 1 1   86 1
1  466 1 1  192 1 1  109 1 1   55 1 1    1 1
1  107 1 1  110 1 1  332 1 2 2569 0 2 2506 0
2 2409 0 2 2218 0 2 1857 0 2 1829 0 2 1562 0
2 1470 0 2 1363 0 2 1030 0 2  860 0 2 1258 0
2 2246 0 2 1870 0 2 1799 0 2 1709 0 2 1674 0
2 1568 0 2 1527 0 2 1324 0 2  957 0 2  932 0
2  847 0 2  848 0 2 1850 0 2 1843 0 2 1535 0
2 1447 0 2 1384 0 2  414 1 2 2204 1 2 1063 1
2  481 1 2  105 1 2  641 1 2  390 1 2  288 1
2  421 1 2   79 1 2  748 1 2  486 1 2   48 1
2  272 1 2 1074 1 2  381 1 2   10 1 2   53 1
2   80 1 2   35 1 2  248 1 2  704 1 2  211 1
2  219 1 2  606 1 3 2640 0 3 2430 0 3 2252 0
3 2140 0 3 2133 0 3 1238 0 3 1631 0 3 2024 0
3 1345 0 3 1136 0 3  845 0 3  422 1 3  162 1
3   84 1 3  100 1 3    2 1 3   47 1 3  242 1
3  456 1 3  268 1 3  318 1 3   32 1 3  467 1
3   47 1 3  390 1 3  183 1 3  105 1 3  115 1
3  164 1 3   93 1 3  120 1 3   80 1 3  677 1
3   64 1 3  168 1 3   74 1 3   16 1 3  157 1
3  625 1 3   48 1 3  273 1 3   63 1 3   76 1
3  113 1 3  363 1
;
run;

/*--Get survival plot data from LIFETEST procedure--*/
ods select none;
ods output Survivalplot=SurvivalPlotData;
proc lifetest data=BMT plots=survival(atrisk=0 to 2500 by 500);
   time T * Status(0);
   strata Group / test=logrank adjust=sidak;
run;
ods select all;


/*--Survival Plot with outer Risk Table using AxisTable--*/

ods graphics / reset width=5in height=3in ;
title 'Product-Limit Survival Estimates';
title2  h=0.8 'With Number of Subjects at Risk';
footnote j=l h=6pt italic 'This visual is for discussion of graph features only.'  
         '  The actual details should be customized by user to suit their application.';
proc sgplot data=SurvivalPlotData noborder;
  step x=time y=survival / group=stratum name='s';
  scatter x=time y=censored / markerattrs=(symbol=plus) name='c';
  scatter x=time y=censored / markerattrs=(symbol=plus) GROUP=stratum;
  *xaxistable atrisk / x=tatrisk class=stratum colorgroup=stratum valueattrs=(weight=bold);
  keylegend 'c' / location=inside position=topright;
  keylegend 's' / linelength=20;
  *controls the graph axis;
  xaxis values=(500 to 2500 by 500);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Apr 2020 18:33:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/637003#M189325</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-04-02T18:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: Proc LifeTest X Axis Starting Point</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/637494#M189483</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/140136"&gt;@Denali&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to create a Kaplan-Mier Plot with x-axis starting at Year 5 instead of Year 0 because all my patients have survived at least 5 years. I do not want to present the flat line from Year 0 to Year 5. Below is my code and could anyone please tell me how to make the x-axis &lt;A href="https://aboutpetguide.com/best-automatic-cat-feeders/" target="_self"&gt;&lt;FONT color="#333333"&gt;about&lt;/FONT&gt;&lt;/A&gt; starting at 5 instead of 0?&amp;nbsp; Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ods graphics on / width = 6 in height = in border = off ;&lt;BR /&gt;ods graphics on/ imagefmt = tiff imagename = "Figure_AKI_Survivors" reset = index;&lt;BR /&gt;ods listing image_dpi = 300 style = axis_wall style=StatColor;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc lifetest data=two plots=survival(test atrisk =5 to 15 by 2.5)&lt;BR /&gt;/* ods select SurvivalPlot;*/&lt;BR /&gt;outsur=survival2;&lt;BR /&gt;time Survive_year*death(0);&lt;BR /&gt;label Survive_year='Time (Years)';&lt;BR /&gt;strata AKI;&lt;BR /&gt;ods output SurvivalPlot = graph;&lt;BR /&gt;run;&lt;BR /&gt;ods graphics off;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I am having difficulty adjusting the X-axis range for a survival plot using PROC LIFETEST&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rather than starting at "0", I want to start at "12000" instead by intervals of "1000"&lt;/P&gt;&lt;P&gt;any solution ?&lt;/P&gt;</description>
      <pubDate>Sat, 04 Apr 2020 03:55:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/637494#M189483</guid>
      <dc:creator>enatx</dc:creator>
      <dc:date>2020-04-04T03:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: Proc LifeTest X Axis Starting Point</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/637579#M189504</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This actually worked!!! THANK YOU!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But there is 2 more things that I am trying to accomplish:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. How to add "log rank p" under "+Censor"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. I also tried to add "AKI" as my group name for the legend (before No ----- and Yes ----)-&lt;/P&gt;&lt;P&gt;I thougt the " label&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;stratum = AKI;"&amp;nbsp; or "keylegend 'No' 'Yes' / title="AKI";&amp;nbsp;"&amp;nbsp;&lt;/STRONG&gt;would add "AKI"but it did not.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/*--Get survival plot data from LIFETEST procedure--*/&lt;BR /&gt;ods select none;&lt;BR /&gt;ods output Survivalplot=SurvivalPlotData;&lt;BR /&gt;proc lifetest data=two plots=survival(atrisk=5 to 20 by 2.5);&lt;BR /&gt;time Survive_year * death(0);&lt;BR /&gt;strata AKI;&lt;BR /&gt;run;&lt;BR /&gt;ods select all;&lt;/P&gt;&lt;P&gt;/*--Survival Plot with outer Risk Table using AxisTable--*/&lt;/P&gt;&lt;P&gt;ods graphics / reset width=5in height=3in ;&lt;BR /&gt;title 'Product-Limit Survival Estimates';&lt;BR /&gt;title2 h=0.8 'With Number of Subjects at Risk';&lt;BR /&gt;ods listing gpath= "H:\Biostatistics\Ihsin\Subspecialty Medicine\Renal Service\Latcha,Sheron\SAS Program" image_dpi=300 ;&lt;BR /&gt;ods graphics on/ imagefmt = tiff imagename = "Figure_AKI_Survivor_5yr" reset = index;&lt;BR /&gt;proc sgplot data=SurvivalPlotData noborder;&lt;BR /&gt;step x=time y=survival / group=stratum name='s';&lt;BR /&gt;scatter x=time y=censored / markerattrs=(symbol=plus) name='c';&lt;BR /&gt;scatter x=time y=censored / markerattrs=(symbol=plus) GROUP=stratum;&lt;BR /&gt;xaxistable atrisk / x=tatrisk location=inside class=stratum colorgroup=stratum valueattrs=(weight=bold);&lt;BR /&gt;keylegend 'c' / location=inside position=topright;&lt;BR /&gt;keylegend 's' / linelength=20;&lt;BR /&gt;&lt;STRONG&gt;keylegend 'No' 'Yes' / title="AKI";&lt;/STRONG&gt;&lt;BR /&gt;*controls the graph axis;&lt;BR /&gt;xaxis values=(5 to 20 by 5);&lt;BR /&gt;yaxis values=(0 to 1 by .2);&lt;BR /&gt;label time = Time (Year) stratum = AKI;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Apr 2020 14:15:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/637579#M189504</guid>
      <dc:creator>Denali</dc:creator>
      <dc:date>2020-04-04T14:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: Proc LifeTest X Axis Starting Point</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/637610#M189516</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/320715"&gt;@enatx&lt;/a&gt;&amp;nbsp;Change the XAXIS statement in the solution I posted.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it doesn't work, show your code.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Apr 2020 19:08:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-LifeTest-X-Axis-Starting-Point/m-p/637610#M189516</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-04-04T19:08:20Z</dc:date>
    </item>
  </channel>
</rss>

