<?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: cumulative percentage plot of event over time (multiple arms) in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/cumulative-percentage-plot-of-event-over-time-multiple-arms/m-p/428999#M68533</link>
    <description>&lt;P&gt;Thank you very much&amp;nbsp;&lt;SPAN class="login-bold"&gt;&lt;A id="link_28" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884" target="_self"&gt;ballardw&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="login-bold"&gt;Yes, for the first one, it is what I want.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="login-bold"&gt;I did not know proc freq can be used for continuous variable (in my case the time is continuous).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="login-bold"&gt;for the second one, is it possible to include the event=0 in the denominator, so the overall % will not reach 100% in the end?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jan 2018 04:05:35 GMT</pubDate>
    <dc:creator>fengyuwuzu</dc:creator>
    <dc:date>2018-01-19T04:05:35Z</dc:date>
    <item>
      <title>cumulative percentage plot of event over time (multiple arms)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/cumulative-percentage-plot-of-event-over-time-multiple-arms/m-p/428849#M68523</link>
      <description>&lt;P&gt;I want to plot the cumulative percentage of event over time, and have multiple arms, so I want to plot the curves in the single graph.&lt;/P&gt;
&lt;P&gt;Time is continuous. event is 0 or 1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone recommend an example how to do this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 16:17:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/cumulative-percentage-plot-of-event-over-time-multiple-arms/m-p/428849#M68523</guid>
      <dc:creator>fengyuwuzu</dc:creator>
      <dc:date>2018-01-18T16:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: cumulative percentage plot of event over time (multiple arms) [how to improve your question]</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/cumulative-percentage-plot-of-event-over-time-multiple-arms/m-p/428856#M68524</link>
      <description>&lt;P&gt;Hello &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/56807"&gt;@fengyuwuzu&lt;/a&gt;,&lt;/P&gt;&lt;BR /&gt; &lt;P&gt;Your question requires more details before experts can help.&amp;nbsp;Can you revise your question to include more information?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Review this checklist:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Specify a meaningful subject line for your topic.&amp;nbsp; Avoid generic subjects like "need help," "SAS query," or "urgent."&lt;/LI&gt;
&lt;LI&gt;When appropriate, provide sample data in text or DATA step format.&amp;nbsp; See &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;this article for one method&lt;/A&gt;&amp;nbsp;you can use.&lt;/LI&gt;
&lt;LI&gt;If you're encountering an error in SAS, include the SAS log or a screenshot of the error condition.&amp;nbsp;Use the&amp;nbsp;&lt;STRONG&gt;Photos&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;button to include the image in your message.&lt;BR /&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" style="width: 279px;"&gt;&lt;IMG src="https://kntur85557.i.lithium.com/t5/image/serverpage/image-id/16608i91A52F817EAC9A69/image-dimensions/279x150?v=1.0" width="279" height="150" alt="use_buttons.png" title="use_buttons.png" /&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;It also helps to include an example (table or picture) of the result that you're trying to achieve.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;To edit your original message, select the "blue gear" icon at the top of the message and select&amp;nbsp;&lt;STRONG&gt;Edit Message&lt;/STRONG&gt;.&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;From there you can adjust the title and add more details to the body of the message.&amp;nbsp; Or, simply reply to this message with any additional information you can supply.&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" style="width: 229px;"&gt;&lt;IMG src="https://kntur85557.i.lithium.com/t5/image/serverpage/image-id/16605iAC020BC79315B045/image-size/large?v=1.0&amp;amp;px=600" alt="edit_post.png" title="edit_post.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;SAS experts are eager to help -- help&amp;nbsp;&lt;EM&gt;them&lt;/EM&gt; by providing as much detail as you can.&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style:italic;font-size:smaller;"&gt;This prewritten response was triggered for you by fellow SAS Support Communities member &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&lt;/SPAN&gt;&lt;/P&gt;.</description>
      <pubDate>Thu, 18 Jan 2018 16:25:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/cumulative-percentage-plot-of-event-over-time-multiple-arms/m-p/428856#M68524</guid>
      <dc:creator>Community_Guide</dc:creator>
      <dc:date>2018-01-18T16:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: cumulative percentage plot of event over time (multiple arms)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/cumulative-percentage-plot-of-event-over-time-multiple-arms/m-p/428859#M68525</link>
      <description>&lt;P&gt;Example data&lt;/P&gt;
&lt;P&gt;Which percentages you want calculated and plotted&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The basic plot would be created once the data is summarized assuming you have variable to indicate which "arm" (what ever that may mean) the represents with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sgplot data=want;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; series x=time y=percentagevalue/group=arm;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without seeing the data exactly how to calculate your percentages is problematical though Proc Freq is the first thing that comes to mind to do cumulative percentages of counts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 16:29:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/cumulative-percentage-plot-of-event-over-time-multiple-arms/m-p/428859#M68525</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-01-18T16:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: cumulative percentage plot of event over time (multiple arms)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/cumulative-percentage-plot-of-event-over-time-multiple-arms/m-p/428912#M68527</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have1;
 input ID $ arm $ event days ;
 datalines;
 001 A 1 10.5
 002 B 1 49.7
 003 A 1 14.5
 004 B 1 28.5
 005 A 1 37.9
 006 B 1 41.7
 007 A 1 18.3
 008 A 1 26.5
 009 A 1 39.3
 010 B 1 51.9
 011 B 1 31.7
 012 A 1 17.4
 013 B 1 25.3
 014 A 1 47.4
 015 A 1 15.7
 016 B 1 34.3
 017 B 1 47.5
 018 A 1 56.1
 019 B 1 27.8
 020 A 1 17.4
 021 B 1 43.3
 022 A 1 52.7
 023 A 1 64.8
 024 B 1 43.3
 025 A 1 52.7
 026 A 1 64.8
 027 B 1 43.3
 028 B 1 52.7
 029 B 1 64.8
 030 A 1 44.9
;
 run;


 data have2;
 input ID $ arm $ event days ;
 datalines;
 001 A 1 10.5
 002 B 1 49.7
 003 A 0 14.5
 004 B 0 28.5
 005 A 1 37.9
 006 B 1 41.7
 007 A 0 18.3
 008 A 1 26.5
 009 A 1 39.3
 010 B 0 51.9
 011 B 1 31.7
 012 A 1 17.4
 013 B 0 25.3
 014 A 0 47.4
 015 A 1 15.7
 016 B 1 34.3
 017 B 1 47.5
 018 A 1 56.1
 019 B 0 27.8
 020 A 0 17.4
 021 B 1 43.3
 022 A 0 52.7
 023 A 1 64.8
 024 B 1 43.3
 025 A 1 52.7
 026 A 0 64.8
 027 B 0 43.3
 028 B 1 52.7
 029 B 0 64.8
 030 A 0 44.9
;
 run;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In data have1, every one has event (event=1);&lt;/P&gt;
&lt;P&gt;in data have2, only some have event (event=1)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;want to get a plot of cumulative percentage of event in both situation&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 20:20:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/cumulative-percentage-plot-of-event-over-time-multiple-arms/m-p/428912#M68527</guid>
      <dc:creator>fengyuwuzu</dc:creator>
      <dc:date>2018-01-18T20:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: cumulative percentage plot of event over time (multiple arms)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/cumulative-percentage-plot-of-event-over-time-multiple-arms/m-p/428917#M68528</link>
      <description>&lt;P&gt;Does this do something like what you want for Have1?&lt;/P&gt;
&lt;PRE&gt;proc sort data=have1;
   by arm days;
run;
proc freq data=have1;
   by arm;
   tables days/out=h1freq outcum;
run;

proc sgplot data=h1freq;
   series x=days y=cum_pct/group=arm;
   label cum_pct='Cumulative  Percentage';
run;&lt;/PRE&gt;
&lt;P&gt;If that is close then the main difference for doing have2 would be to include a WHERE event=1; in the Proc freq.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 20:53:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/cumulative-percentage-plot-of-event-over-time-multiple-arms/m-p/428917#M68528</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-01-18T20:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: cumulative percentage plot of event over time (multiple arms)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/cumulative-percentage-plot-of-event-over-time-multiple-arms/m-p/428999#M68533</link>
      <description>&lt;P&gt;Thank you very much&amp;nbsp;&lt;SPAN class="login-bold"&gt;&lt;A id="link_28" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884" target="_self"&gt;ballardw&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="login-bold"&gt;Yes, for the first one, it is what I want.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="login-bold"&gt;I did not know proc freq can be used for continuous variable (in my case the time is continuous).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="login-bold"&gt;for the second one, is it possible to include the event=0 in the denominator, so the overall % will not reach 100% in the end?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2018 04:05:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/cumulative-percentage-plot-of-event-over-time-multiple-arms/m-p/428999#M68533</guid>
      <dc:creator>fengyuwuzu</dc:creator>
      <dc:date>2018-01-19T04:05:35Z</dc:date>
    </item>
  </channel>
</rss>

