<?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 Questions about KM-Plot in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Questions-about-KM-Plot/m-p/909968#M358886</link>
    <description>&lt;P&gt;Hi guys! I'm creating one KM-Plot and have some questions;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods output Survivalplot=SurvivalPlotData;&amp;nbsp;&lt;BR /&gt;ods graphics on;&lt;BR /&gt;proc lifetest data=adtte1 plots=survival(atrisk=0 to 15 by 3);&lt;BR /&gt;time aval * cnsr(1);&lt;BR /&gt;strata trtp/ test=logrank adjust=sidak; /&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/**2)Using Proc Sgplot**/;&lt;BR /&gt;ods listing style = htmlblue gpath="/home/u62957101/sasuser.v94/Project2C/output";&lt;BR /&gt;ods graphics / reset width=5in height=3in imagename="Survival_Plot_SG" ;&lt;BR /&gt;title1 j=c "Kaplan Meier Curves for Progression Free Survival by Treatment Arm in Second";&lt;BR /&gt;title2 j=c"Remission";&lt;BR /&gt;title3 j=c"Randomized Subjects with 2nd Remission";&lt;BR /&gt;footnote1 " ";&lt;BR /&gt;footnote2 j=l h=6pt "Study PRJ5457C" j=r "Page 1 of 1";&lt;BR /&gt;footnote3 j=l h=6pt "TLG Specifications, Version 9.4";&lt;BR /&gt;/**Creation of KM Plot**/;&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 ) GROUP=stratum;&lt;BR /&gt;scatter x=time y=censored / markerattrs=(symbol=plus) name="c";&lt;BR /&gt;xaxistable atrisk/ x=tatrisk class=stratum colorgroup=stratum&lt;BR /&gt;valueattrs=(weight=bold);&amp;nbsp;&lt;BR /&gt;keylegend "s" / linelength=20;&lt;BR /&gt;keylegend "c" / location = inside position=topright;&lt;BR /&gt;run;&lt;BR /&gt;title;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-12-31 at 4.20.46 AM.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/92138i8E8AB31F8989D0D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2023-12-31 at 4.20.46 AM.png" alt="Screenshot 2023-12-31 at 4.20.46 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have 2 questions:&lt;/P&gt;&lt;P&gt;1)How can I change the cmp-135 group line to red color and placebo group to blue color?&lt;/P&gt;&lt;P&gt;2)I utilized the&amp;nbsp;plots=survival(atrisk=0 to 15 by 3) to hope my X line cutoff be like "0,3,6,9,12,15" , while it still are "0,2.5,5,..15);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 31 Dec 2023 09:22:29 GMT</pubDate>
    <dc:creator>Sikcion</dc:creator>
    <dc:date>2023-12-31T09:22:29Z</dc:date>
    <item>
      <title>Questions about KM-Plot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Questions-about-KM-Plot/m-p/909968#M358886</link>
      <description>&lt;P&gt;Hi guys! I'm creating one KM-Plot and have some questions;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods output Survivalplot=SurvivalPlotData;&amp;nbsp;&lt;BR /&gt;ods graphics on;&lt;BR /&gt;proc lifetest data=adtte1 plots=survival(atrisk=0 to 15 by 3);&lt;BR /&gt;time aval * cnsr(1);&lt;BR /&gt;strata trtp/ test=logrank adjust=sidak; /&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/**2)Using Proc Sgplot**/;&lt;BR /&gt;ods listing style = htmlblue gpath="/home/u62957101/sasuser.v94/Project2C/output";&lt;BR /&gt;ods graphics / reset width=5in height=3in imagename="Survival_Plot_SG" ;&lt;BR /&gt;title1 j=c "Kaplan Meier Curves for Progression Free Survival by Treatment Arm in Second";&lt;BR /&gt;title2 j=c"Remission";&lt;BR /&gt;title3 j=c"Randomized Subjects with 2nd Remission";&lt;BR /&gt;footnote1 " ";&lt;BR /&gt;footnote2 j=l h=6pt "Study PRJ5457C" j=r "Page 1 of 1";&lt;BR /&gt;footnote3 j=l h=6pt "TLG Specifications, Version 9.4";&lt;BR /&gt;/**Creation of KM Plot**/;&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 ) GROUP=stratum;&lt;BR /&gt;scatter x=time y=censored / markerattrs=(symbol=plus) name="c";&lt;BR /&gt;xaxistable atrisk/ x=tatrisk class=stratum colorgroup=stratum&lt;BR /&gt;valueattrs=(weight=bold);&amp;nbsp;&lt;BR /&gt;keylegend "s" / linelength=20;&lt;BR /&gt;keylegend "c" / location = inside position=topright;&lt;BR /&gt;run;&lt;BR /&gt;title;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-12-31 at 4.20.46 AM.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/92138i8E8AB31F8989D0D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2023-12-31 at 4.20.46 AM.png" alt="Screenshot 2023-12-31 at 4.20.46 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have 2 questions:&lt;/P&gt;&lt;P&gt;1)How can I change the cmp-135 group line to red color and placebo group to blue color?&lt;/P&gt;&lt;P&gt;2)I utilized the&amp;nbsp;plots=survival(atrisk=0 to 15 by 3) to hope my X line cutoff be like "0,3,6,9,12,15" , while it still are "0,2.5,5,..15);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 31 Dec 2023 09:22:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Questions-about-KM-Plot/m-p/909968#M358886</guid>
      <dc:creator>Sikcion</dc:creator>
      <dc:date>2023-12-31T09:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: Questions about KM-Plot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Questions-about-KM-Plot/m-p/909972#M358887</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/446290"&gt;@Sikcion&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) To swap the colors, insert a &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/p1dt33l6a6epk6n1chtynsgsjgit.htm" target="_blank" rel="noopener"&gt;STYLEATTRS statement&lt;/A&gt; into your PROC SGPLOT step:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;styleattrs datacontrastcolors=(cxA23A2E cx445694);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(I took the hexadecimal RGB color values that are specified for&amp;nbsp;&lt;FONT face="courier new,courier"&gt;'gcdata2'&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;'gcdata1'&lt;/FONT&gt; in&amp;nbsp;&lt;SPAN&gt;Sashelp.Tmplmst\Styles\Statistical.)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2) For the desired tick marks insert an &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/p07m2vpyq75fgan14m6g5pphnwlr.htm" target="_blank" rel="noopener"&gt;XAXIS statement&lt;/A&gt;&amp;nbsp;into your PROC SGPLOT step:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;xaxis values=(0 to 15 by 3) label='Analysis Value';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Note that without the LABEL= option I got a default x-axis label of "Failure or Censoring Time". So you may also need a &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/n0n6uml63c6h8dn16phbd1arm9g9.htm" target="_blank" rel="noopener"&gt;YAXIS statement&lt;/A&gt; to replace the default y-axis label "Survival Probability".&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 31 Dec 2023 11:42:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Questions-about-KM-Plot/m-p/909972#M358887</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2023-12-31T11:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: Questions about KM-Plot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Questions-about-KM-Plot/m-p/909981#M358891</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://support.sas.com/documentation/onlinedoc/stat/151/kaplan.pdf" target="_blank"&gt;https://support.sas.com/documentation/onlinedoc/stat/151/kaplan.pdf&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;If you are customizing the Kaplan-Meier plot, you should know about this chapter.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 31 Dec 2023 22:37:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Questions-about-KM-Plot/m-p/909981#M358891</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2023-12-31T22:37:58Z</dc:date>
    </item>
  </channel>
</rss>

