<?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: Question about using proc sgplot to make KM-Plot in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Question-about-using-proc-sgplot-to-make-KM-Plot/m-p/910367#M359015</link>
    <description>&lt;P&gt;Have you looked at the INSET statement in Proc SGPLOT? Add variables with the values you want to your plot data set and have the labels for those variables set to display the label text desired.&lt;/P&gt;
&lt;P&gt;Then use those variables in the Inset statement.&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jan 2024 04:12:54 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2024-01-04T04:12:54Z</dc:date>
    <item>
      <title>Question about using proc sgplot to make KM-Plot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-using-proc-sgplot-to-make-KM-Plot/m-p/910346#M359013</link>
      <description>&lt;P&gt;Hi guys! I'm new to proc sgplot function and have some questions:&lt;/P&gt;&lt;P&gt;here is the plot I want to make:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-01-03 at 5.51.59 PM.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/92241iC640BB7E19DF673A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-01-03 at 5.51.59 PM.png" alt="Screenshot 2024-01-03 at 5.51.59 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;here is what I get :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-01-03 at 5.57.27 PM.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/92242i4FF0F505FD50CE6A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-01-03 at 5.57.27 PM.png" alt="Screenshot 2024-01-03 at 5.57.27 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my code: &lt;/P&gt;&lt;PRE&gt;ods output Survivalplot=SurvivalPlotData; /*将生存分析图的数据输入到SurvivalPlotData中*/;
ods graphics on;
proc lifetest data=adtte2 plots=survival(atrisk=0 to 15 by 3 outside(0.15));
time aval*cnsr(1);
strata trtp/order=internal test=logrank adjust=sidak; /**按trtp来分层分析，使用log-rank检验进行生存曲线比较**/
format trtp tfmt.;
run;

/*Using Proc Sgplot*/;
ods listing style = htmlblue gpath="/home/u62957101/sasuser.v94/Project2C/output";
ods graphics / reset width=6in height=4in imagename="Survival_Plot_SG" ;
title1 j=c "Kaplan Meier Curves for Progression Free Survival by Treatment Arm in Second";
title2 j=c"Remission";
title3 j=c"Randomized Subjects with 2nd Remission";
footnote1 "           ";
footnote2 j=l h=6pt  "Study PRJ5457C" j=r "Page 1 of 1";
footnote3 j=l h=6pt  "TLG Specifications, Version 9.4";/**脚注左对齐，脚注垂直文本高度为6磅,且斜体**/;

/*Creation of KM Plot*/;
proc sgplot data=SurvivalPlotData noborder;
step x=time y=survival / group=stratum name="s";
scatter x=time y=censored/ markerattrs=(symbol=plus ) GROUP=stratum;
scatter x=time y=censored / markerattrs=(symbol=plus) name="c";
xaxis values=(0 to 15 by 3) label="Time to Progression(month)" ;
yaxis label="Progression-Free Rate";
xaxistable atrisk/ x=tatrisk class=stratum colorgroup=stratum
valueattrs=(weight=bold); /**x轴下方添加表格，显示每个时间点处于风险的数量；**/
keylegend "s" / linelength=20;
keylegend "c" / location = inside position=topright;
run;&lt;/PRE&gt;&lt;P&gt;My question is that : where can I find any file to learn how to put the value on the table? I've read some files you shared in the website , but can't still figure out how to deal with this part? Thank you!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-01-03 at 6.00.45 PM.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/92243i8B5BE8C3EC2C82FF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-01-03 at 6.00.45 PM.png" alt="Screenshot 2024-01-03 at 6.00.45 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 23:01:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-using-proc-sgplot-to-make-KM-Plot/m-p/910346#M359013</guid>
      <dc:creator>Sikcion</dc:creator>
      <dc:date>2024-01-03T23:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: Question about using proc sgplot to make KM-Plot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-using-proc-sgplot-to-make-KM-Plot/m-p/910367#M359015</link>
      <description>&lt;P&gt;Have you looked at the INSET statement in Proc SGPLOT? Add variables with the values you want to your plot data set and have the labels for those variables set to display the label text desired.&lt;/P&gt;
&lt;P&gt;Then use those variables in the Inset statement.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2024 04:12:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-using-proc-sgplot-to-make-KM-Plot/m-p/910367#M359015</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-01-04T04:12:54Z</dc:date>
    </item>
  </channel>
</rss>

