<?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 Grouping data into deciles and not counting the lowest value in the decile grouping in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Grouping-data-into-deciles-and-not-counting-the-lowest-value-in/m-p/632848#M187672</link>
    <description>&lt;P&gt;Dear All&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to split my data into deciles but not counting the lowest value into the decile grouping&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So my data is as follows&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VARA&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;6&lt;/P&gt;&lt;P&gt;7&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;So the data should be grouped by deciles but 0 should be omitted in the calculation of deciles&lt;/P&gt;&lt;P&gt;VARA&amp;nbsp; &amp;nbsp;Decile_Group&lt;/P&gt;&lt;P&gt;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;/P&gt;&lt;P&gt;6&lt;/P&gt;&lt;P&gt;7&lt;/P&gt;&lt;P&gt;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the remaining data can be grouped by deciles.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;&lt;P&gt;Thanx so much&lt;/P&gt;&lt;P&gt;Randy&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Mar 2020 03:37:14 GMT</pubDate>
    <dc:creator>RandyStan</dc:creator>
    <dc:date>2020-03-18T03:37:14Z</dc:date>
    <item>
      <title>Grouping data into deciles and not counting the lowest value in the decile grouping</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Grouping-data-into-deciles-and-not-counting-the-lowest-value-in/m-p/632848#M187672</link>
      <description>&lt;P&gt;Dear All&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to split my data into deciles but not counting the lowest value into the decile grouping&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So my data is as follows&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VARA&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;6&lt;/P&gt;&lt;P&gt;7&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;So the data should be grouped by deciles but 0 should be omitted in the calculation of deciles&lt;/P&gt;&lt;P&gt;VARA&amp;nbsp; &amp;nbsp;Decile_Group&lt;/P&gt;&lt;P&gt;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;/P&gt;&lt;P&gt;6&lt;/P&gt;&lt;P&gt;7&lt;/P&gt;&lt;P&gt;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the remaining data can be grouped by deciles.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;&lt;P&gt;Thanx so much&lt;/P&gt;&lt;P&gt;Randy&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2020 03:37:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Grouping-data-into-deciles-and-not-counting-the-lowest-value-in/m-p/632848#M187672</guid>
      <dc:creator>RandyStan</dc:creator>
      <dc:date>2020-03-18T03:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping data into deciles and not counting the lowest value in the decile grouping</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Grouping-data-into-deciles-and-not-counting-the-lowest-value-in/m-p/632851#M187674</link>
      <description>&lt;P&gt;Did you already see &lt;A href="https://communities.sas.com/t5/General-SAS-Programming/Proc-Rank-excluding-zeros/td-p/146583" target="_self"&gt;this discussion&lt;/A&gt;? I believe &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats&lt;/a&gt;&amp;nbsp;answer there is what you need.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2020 04:16:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Grouping-data-into-deciles-and-not-counting-the-lowest-value-in/m-p/632851#M187674</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-03-18T04:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping data into deciles and not counting the lowest value in the decile grouping</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Grouping-data-into-deciles-and-not-counting-the-lowest-value-in/m-p/632853#M187676</link>
      <description>&lt;P&gt;Like this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data HAVE; 
 do I=0 to 100;
   output; 
  end; 
run;

proc rank data=HAVE(where=(I ne 0)) groups=9 out=RANK; 
  var I; 
  ranks GRP ;
run;
 
data WANT;
  set HAVE(where=(I eq 0))
      RANK(in=RANKED);
  GRP=sum(GRP,1)*RANKED;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2020 04:30:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Grouping-data-into-deciles-and-not-counting-the-lowest-value-in/m-p/632853#M187676</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-03-18T04:30:40Z</dc:date>
    </item>
  </channel>
</rss>

