<?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: LIFETEST CIF in SAS Software for Learning Community</title>
    <link>https://communities.sas.com/t5/SAS-Software-for-Learning/LIFETEST-CIF/m-p/843664#M783</link>
    <description>&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Thu, 10 Nov 2022 18:55:37 GMT</pubDate>
    <dc:creator>Gene24</dc:creator>
    <dc:date>2022-11-10T18:55:37Z</dc:date>
    <item>
      <title>LIFETEST CIF</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/LIFETEST-CIF/m-p/838886#M731</link>
      <description>&lt;P&gt;I'm attempting to customize the CIF graph from the PROC LIFETEST statement e.g. changing the title of the graph, the thickness of the graph lines, whether the graph lines are dashed, etc. However, I'm unable to find an easy way to do so. Does anyone have any recommendations? I considered using the %CIF macro, but&amp;nbsp;I also would like to display the Gray's test box on the graph, which I don't think I can do if I use the %CIF macro.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the code I'm using to generate the CIF graph with competing risk:&lt;/P&gt;&lt;P&gt;proc lifetest data=WORK.IMPORT plots=cif(test);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; time Time*Status(2) / eventcode=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; strata Variable;&amp;nbsp;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is similar to this one, which was not answered:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Statistical-Procedures/Proc-lifetest-for-competing-risk/m-p/689519#M33245" target="_blank"&gt;https://communities.sas.com/t5/Statistical-Procedures/Proc-lifetest-for-competing-risk/m-p/689519#M33245&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 01:12:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/LIFETEST-CIF/m-p/838886#M731</guid>
      <dc:creator>lilies</dc:creator>
      <dc:date>2022-10-17T01:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: LIFETEST CIF</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/LIFETEST-CIF/m-p/838942#M732</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods select none;
ods output cifPlot=cifPlot GrayTest=GrayTest;
proc lifetest data=sashelp.bmt plots=cif(test);
      time t*Status(0) / eventcode=1;
     strata Group; 
run;
ods select all;
data _null_;
 set GrayTest;
 call symputx('pvalue',put(ProbChiSq,pvalue. -l));
run;

title 'Whatever is Title';
proc sgplot data=cifPlot;
styleattrs DATALINEPATTERNS=(solid dash shortdash);
step x=Time y=CIF / group=Stratum lineattrs=( thickness=4) ;
yaxis values=(0 to 1 by 0.2);
inset "Gray Test p=&amp;amp;pvalue." /border;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1666007379776.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76245iEF043E640F9D73A6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1666007379776.png" alt="Ksharp_0-1666007379776.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 11:49:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/LIFETEST-CIF/m-p/838942#M732</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-10-17T11:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: LIFETEST CIF</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/LIFETEST-CIF/m-p/838978#M733</link>
      <description>&lt;P&gt;Thank you so much&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;! Is there a way to put an at risk table at the bottom of the graph like in survival plots?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 14:13:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/LIFETEST-CIF/m-p/838978#M733</guid>
      <dc:creator>lilies</dc:creator>
      <dc:date>2022-10-17T14:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: LIFETEST CIF</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/LIFETEST-CIF/m-p/839162#M734</link>
      <description>&lt;P&gt;OK. You want this ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods select none;
ods output cifPlot=cifPlot GrayTest=GrayTest ;
proc lifetest data=sashelp.bmt plots=cif(test );
      time t*Status(0) / eventcode=1;
     strata Group; 
run;

ods output SurvivalPlot=SurvivalPlot;
proc lifetest data=sashelp.bmt  plots=survival(atrisk=0 to 2500 by 500);
      time t*Status(0) ;
     strata Group; 
run;
ods select all;


data _null_;
 set GrayTest;
 call symputx('pvalue',put(ProbChiSq,pvalue. -l));
run;

data want;
 merge cifPlot SurvivalPlot(keep=StratumNum Time tAtRisk AtRisk where=(tAtRisk is not missing)) ;
 by StratumNum Time;
length new_Stratum $ 80;
retain new_Stratum;
if first.StratumNum then call missing(new_Stratum);
if not missing(Stratum) then  new_Stratum=Stratum;
run;

title 'Whatever is Title';
ods graphics /ATTRPRIORITY=none ;
proc sgplot data=want;
styleattrs DATALINEPATTERNS=(solid dash shortdash);
step x=Time y=CIF / group=new_Stratum lineattrs=( thickness=4) ;
xaxistable atrisk / x=tAtRisk class=new_Stratum colorgroup=new_Stratum valueattrs=(weight=bold);
yaxis values=(0 to 1 by 0.2);
inset "Gray Test p=&amp;amp;pvalue." /border;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1666093126042.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76268i69ECB546E0C92A2C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1666093126042.png" alt="Ksharp_0-1666093126042.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 11:38:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/LIFETEST-CIF/m-p/839162#M734</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-10-18T11:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: LIFETEST CIF</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/LIFETEST-CIF/m-p/842562#M756</link>
      <description>&lt;P&gt;In a related question, I'm having difficulty editing the x and y scale and the graph title for my kaplan meier curve. This is my code here - what am I missing?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc lifetest data=WORK.IMPORT2 atrisk plots=survival(cb=hw atrisk(outside(0.15))=0 to 1825 by 365);&lt;BR /&gt;time 'Time to RN'n*'Re_RN (1=RN)'n(0);&lt;BR /&gt;strata 'Re_ICPI_Status (2=daul; 1=single'n;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;title 'Kaplan meier';&lt;BR /&gt;proc sgplot data=WORK.IMPORT2 ;&lt;BR /&gt;xaxis values=(0 to 1825 by 365);&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 20:04:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/LIFETEST-CIF/m-p/842562#M756</guid>
      <dc:creator>Gene24</dc:creator>
      <dc:date>2022-11-04T20:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: LIFETEST CIF</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/LIFETEST-CIF/m-p/842642#M757</link>
      <description>&lt;P&gt;I didn't get any problem yet !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods select none;
ods output SurvivalPlot=SurvivalPlot;
proc lifetest data=sashelp.bmt  plots=survival(atrisk=0 to 2500 by 500);
      time t*Status(0) ;
     strata Group; 
run;
ods select all;

title 'Whatever is Title';
ods graphics /ATTRPRIORITY=none ;
proc sgplot data=SurvivalPlot;
styleattrs DATALINEPATTERNS=(solid dash shortdash);
step x=Time y=Survival / group=Stratum lineattrs=( thickness=4) ;
yaxis values=(0 to 1 by 0.1);
xaxis values=(0 to 2500 by 200);

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1667642735607.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76972i8F6570717DCB4674/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1667642735607.png" alt="Ksharp_0-1667642735607.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Nov 2022 10:05:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/LIFETEST-CIF/m-p/842642#M757</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-11-05T10:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: LIFETEST CIF</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/LIFETEST-CIF/m-p/842643#M758</link>
      <description>Also check Freelancer's post at &lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/Graphics-Programming/SGPLOT-VBAR-XAXIS-Label-Interval/m-p/842542#M23242" target="_blank"&gt;https://communities.sas.com/t5/Graphics-Programming/SGPLOT-VBAR-XAXIS-Label-Interval/m-p/842542#M23242&lt;/A&gt;</description>
      <pubDate>Sat, 05 Nov 2022 10:10:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/LIFETEST-CIF/m-p/842643#M758</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-11-05T10:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: LIFETEST CIF</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/LIFETEST-CIF/m-p/843664#M783</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2022 18:55:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/LIFETEST-CIF/m-p/843664#M783</guid>
      <dc:creator>Gene24</dc:creator>
      <dc:date>2022-11-10T18:55:37Z</dc:date>
    </item>
  </channel>
</rss>

