<?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 Split into deciles based on dates in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Split-into-deciles-based-on-dates/m-p/809350#M319162</link>
    <description>&lt;P&gt;I want to assign deciles for&amp;nbsp;&lt;EM&gt;tweets&lt;/EM&gt; within each &lt;EM&gt;publishday&lt;/EM&gt;. How can I do it?&lt;/P&gt;&lt;P&gt;Below is my code:&lt;/P&gt;&lt;P&gt;proc sort data=abc.twitter;&lt;BR /&gt;by publishday tweets;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data try2;&lt;BR /&gt;set abc.twitter;&lt;BR /&gt;keep publishday tweets;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc rank data=try2 groups=10 out=try2;&lt;BR /&gt;var tweets;&lt;BR /&gt;ranks decile;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result I get is only 8 ranks instead of 10 ranks each day. I use proc freq to check out the number of ranks within each day. But only 1,3,4,5,6,7,8,9 are shown, and rank 0 and rank 2 are missing.&lt;/P&gt;&lt;P&gt;proc freq data=try;&lt;BR /&gt;table decile;&lt;BR /&gt;by publishday;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Fri, 22 Apr 2022 16:13:04 GMT</pubDate>
    <dc:creator>Jarvin99</dc:creator>
    <dc:date>2022-04-22T16:13:04Z</dc:date>
    <item>
      <title>Split into deciles based on dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Split-into-deciles-based-on-dates/m-p/809350#M319162</link>
      <description>&lt;P&gt;I want to assign deciles for&amp;nbsp;&lt;EM&gt;tweets&lt;/EM&gt; within each &lt;EM&gt;publishday&lt;/EM&gt;. How can I do it?&lt;/P&gt;&lt;P&gt;Below is my code:&lt;/P&gt;&lt;P&gt;proc sort data=abc.twitter;&lt;BR /&gt;by publishday tweets;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data try2;&lt;BR /&gt;set abc.twitter;&lt;BR /&gt;keep publishday tweets;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc rank data=try2 groups=10 out=try2;&lt;BR /&gt;var tweets;&lt;BR /&gt;ranks decile;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result I get is only 8 ranks instead of 10 ranks each day. I use proc freq to check out the number of ranks within each day. But only 1,3,4,5,6,7,8,9 are shown, and rank 0 and rank 2 are missing.&lt;/P&gt;&lt;P&gt;proc freq data=try;&lt;BR /&gt;table decile;&lt;BR /&gt;by publishday;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2022 16:13:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Split-into-deciles-based-on-dates/m-p/809350#M319162</guid>
      <dc:creator>Jarvin99</dc:creator>
      <dc:date>2022-04-22T16:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: Split into deciles based on dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Split-into-deciles-based-on-dates/m-p/809352#M319164</link>
      <description>Check your data for duplicates.</description>
      <pubDate>Fri, 22 Apr 2022 16:29:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Split-into-deciles-based-on-dates/m-p/809352#M319164</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-04-22T16:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: Split into deciles based on dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Split-into-deciles-based-on-dates/m-p/809358#M319167</link>
      <description>&lt;P&gt;No. I just checked. I have unique firm-date data for tweets for a firm on a day. Now, it becomes only 8 ranks after I rerun the same codes. Really don't know why the results are inconsistent.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2022 16:48:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Split-into-deciles-based-on-dates/m-p/809358#M319167</guid>
      <dc:creator>Jarvin99</dc:creator>
      <dc:date>2022-04-22T16:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: Split into deciles based on dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Split-into-deciles-based-on-dates/m-p/809359#M319168</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/415810"&gt;@Jarvin99&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;No. I just checked. I have unique firm-date data for tweets for a firm on a day. Now, it becomes only 8 ranks after I rerun the same codes. Really don't know why the results are inconsistent.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The duplicates you need to check for are in the number of tweets, not in the unique publishday&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another possibility why you are getting only 8 ranks is because there is only 8 data points for a unique publishday&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2022 16:51:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Split-into-deciles-based-on-dates/m-p/809359#M319168</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-04-22T16:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Split into deciles based on dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Split-into-deciles-based-on-dates/m-p/809367#M319174</link>
      <description>&lt;P&gt;Aren't tweets text data? How are deciles being calculated for that? Or should it be based on time of day for the tweets?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have your deciles on the variable tweets. You're saying the variable tweets doesn't have any duplicates? So no retweets in the data?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2022 17:25:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Split-into-deciles-based-on-dates/m-p/809367#M319174</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-04-22T17:25:09Z</dc:date>
    </item>
  </channel>
</rss>

