<?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: Creating custom frequency bins for consecutive numbers in a dataset in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Custom-frequency-bins/m-p/574402#M12694</link>
    <description>My apologies, the date does not really play a role in this dataset.&lt;BR /&gt;&lt;BR /&gt;May I ask what you mean by providing something with the counts done&lt;BR /&gt;manually?&lt;BR /&gt;</description>
    <pubDate>Wed, 17 Jul 2019 23:21:37 GMT</pubDate>
    <dc:creator>marksanter</dc:creator>
    <dc:date>2019-07-17T23:21:37Z</dc:date>
    <item>
      <title>Custom frequency bins</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Custom-frequency-bins/m-p/574363#M12690</link>
      <description>&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is the best way to create custom frequency bins?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jul 2019 16:30:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Custom-frequency-bins/m-p/574363#M12690</guid>
      <dc:creator>marksanter</dc:creator>
      <dc:date>2019-07-20T16:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: Creating custom frequency bins for consecutive numbers in a dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Custom-frequency-bins/m-p/574365#M12691</link>
      <description>What about the 10's? Ignore them completely?&lt;BR /&gt;&lt;BR /&gt;Have you looked into multilevel formats yet? I would highly recommend using a mlf to get this result, which becomes quite simple.</description>
      <pubDate>Wed, 17 Jul 2019 21:06:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Custom-frequency-bins/m-p/574365#M12691</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-17T21:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Creating custom frequency bins for consecutive numbers in a dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Custom-frequency-bins/m-p/574378#M12692</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I have not looked into MLFs. I am still quite new to SAS.&lt;BR /&gt;&lt;BR /&gt;Mark&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jul 2019 16:31:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Custom-frequency-bins/m-p/574378#M12692</guid>
      <dc:creator>marksanter</dc:creator>
      <dc:date>2019-07-20T16:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: Creating custom frequency bins for consecutive numbers in a dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Custom-frequency-bins/m-p/574399#M12693</link>
      <description>&lt;P&gt;I haven't a clue what role the date plays in this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you provide something with the counts done manually from the example data?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 23:01:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Custom-frequency-bins/m-p/574399#M12693</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-07-17T23:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: Creating custom frequency bins for consecutive numbers in a dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Custom-frequency-bins/m-p/574402#M12694</link>
      <description>My apologies, the date does not really play a role in this dataset.&lt;BR /&gt;&lt;BR /&gt;May I ask what you mean by providing something with the counts done&lt;BR /&gt;manually?&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Jul 2019 23:21:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Custom-frequency-bins/m-p/574402#M12694</guid>
      <dc:creator>marksanter</dc:creator>
      <dc:date>2019-07-17T23:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: Creating custom frequency bins for consecutive numbers in a dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Custom-frequency-bins/m-p/574411#M12695</link>
      <description>It means show what you expect as the final result from this data. Then we can test our programs to ensure they get the right result otherwise we're making guesses and this becomes a longer back and forth process.</description>
      <pubDate>Thu, 18 Jul 2019 01:38:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Custom-frequency-bins/m-p/574411#M12695</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-18T01:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: Creating custom frequency bins for consecutive numbers in a dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Custom-frequency-bins/m-p/574448#M12698</link>
      <description>&lt;P&gt;Keep it simple:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data counts;
do n = 1 by 1 until(last.count);
    set have; 
    by count notsorted;
    end;
if count = 5 then do;
    do bin = 1 to 141 by 10;
        if n &amp;gt;= bin then output;
        end;
    end;
keep n bin;
run;

proc sql;
create table want as
select
    bin,
    count(n) as nbSequences,
    sum(n) as nb5Counts
from counts
group by bin;
quit;

proc print data=want noobs; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;                                      nb
                           bin    Sequences    nb5Counts

                             1        5           155
                            11        2           135
                            21        2           135
                            31        2           135
                            41        2           135
                            51        2           135
                            61        1            81
                            71        1            81
                            81        1            81
&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Jul 2019 05:09:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Custom-frequency-bins/m-p/574448#M12698</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-07-18T05:09:59Z</dc:date>
    </item>
  </channel>
</rss>

