<?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: splitting data into three group in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/splitting-data-into-three-group/m-p/376291#M90302</link>
    <description>Thank. There are ranges of variables.&lt;BR /&gt;I think this will work for my requirement.</description>
    <pubDate>Sun, 16 Jul 2017 00:52:30 GMT</pubDate>
    <dc:creator>jazzy</dc:creator>
    <dc:date>2017-07-16T00:52:30Z</dc:date>
    <item>
      <title>splitting data into three group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/splitting-data-into-three-group/m-p/376287#M90300</link>
      <description>&lt;P&gt;I have variable size having more than 1000 values. I want to create a group of (low, medium, high) on the basis of size values. so whole size will be divided into 3 groups. top 1 are high then medium and low.&lt;/P&gt;&lt;P&gt;in this example data it is shown that there are 9 values. Top3 are in high group, having values in the middle level 3 values are in medium group then lowest 3 are in low group. &lt;STRONG&gt;So my intention is to create this group variable.&lt;/STRONG&gt; &amp;nbsp;&lt;/P&gt;&lt;P&gt;Size group&lt;/P&gt;&lt;P&gt;10 &amp;nbsp; &amp;nbsp;low&lt;/P&gt;&lt;P&gt;20 &amp;nbsp; &amp;nbsp;low&lt;/P&gt;&lt;P&gt;50 &amp;nbsp; &amp;nbsp;low&lt;/P&gt;&lt;P&gt;50 &amp;nbsp; &amp;nbsp;medium&lt;/P&gt;&lt;P&gt;70 &amp;nbsp; medium&lt;/P&gt;&lt;P&gt;80 &amp;nbsp; Medium&lt;/P&gt;&lt;P&gt;95 &amp;nbsp; high&lt;/P&gt;&lt;P&gt;99 &amp;nbsp; high&lt;/P&gt;&lt;P&gt;99 &amp;nbsp; high&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jul 2017 00:43:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/splitting-data-into-three-group/m-p/376287#M90300</guid>
      <dc:creator>jazzy</dc:creator>
      <dc:date>2017-07-16T00:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: splitting data into three group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/splitting-data-into-three-group/m-p/376289#M90301</link>
      <description>&lt;P&gt;Are those the only values you'll see in the dataset? Or are there ranges of the variables?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One quick way is to use PROC RANK which will use percentiles, ie bottom 1/3 will be low by percentiles, top 1/3 will be high using a percentile. Rank will use a 0/1/2 to create the groups and you can rename them if desired.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc rank data=have out=want groups=3;
var size;
ranks rank_size;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/154234"&gt;@jazzy&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I have variable size having more than 1000 values. I want to create a group of (low, medium, high) on the basis of size values. so whole size will be divided into 3 groups. top 1 are high then medium and low.&lt;/P&gt;
&lt;P&gt;in this example data it is shown that there are 9 values. Top3 are in high group, having values in the middle level 3 values are in medium group then lowest 3 are in low group. &lt;STRONG&gt;So my intention is to create this group variable.&lt;/STRONG&gt; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;Size group&lt;/P&gt;
&lt;P&gt;10 &amp;nbsp; &amp;nbsp;low&lt;/P&gt;
&lt;P&gt;20 &amp;nbsp; &amp;nbsp;low&lt;/P&gt;
&lt;P&gt;50 &amp;nbsp; &amp;nbsp;low&lt;/P&gt;
&lt;P&gt;50 &amp;nbsp; &amp;nbsp;medium&lt;/P&gt;
&lt;P&gt;70 &amp;nbsp; medium&lt;/P&gt;
&lt;P&gt;80 &amp;nbsp; Medium&lt;/P&gt;
&lt;P&gt;95 &amp;nbsp; high&lt;/P&gt;
&lt;P&gt;99 &amp;nbsp; high&lt;/P&gt;
&lt;P&gt;99 &amp;nbsp; high&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jul 2017 00:48:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/splitting-data-into-three-group/m-p/376289#M90301</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-07-16T00:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: splitting data into three group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/splitting-data-into-three-group/m-p/376291#M90302</link>
      <description>Thank. There are ranges of variables.&lt;BR /&gt;I think this will work for my requirement.</description>
      <pubDate>Sun, 16 Jul 2017 00:52:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/splitting-data-into-three-group/m-p/376291#M90302</guid>
      <dc:creator>jazzy</dc:creator>
      <dc:date>2017-07-16T00:52:30Z</dc:date>
    </item>
  </channel>
</rss>

