<?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: Create bins of specified width in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Create-bins-of-specified-width/m-p/575890#M162957</link>
    <description>&lt;P&gt;In your original statement of the problem, you said you wanted&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;1=20-30, 2=31-40, 3=41-50, 4=51-60&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you don't subtract 1, you don't get these values. Although, from a purely practical point of view, subtracting 1 shouldn't affect the regression you are going to do, and so subtracting 1 could be omitted without any negative effects.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jul 2019 16:47:53 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2019-07-23T16:47:53Z</dc:date>
    <item>
      <title>Create bins of specified width</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-bins-of-specified-width/m-p/575821#M162933</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to create a new variable YBIN based on my continuous variable Y for use in a regression model. Y is a continuous variable that ranges from 21 to 266 with units of 1 (eg, possible values can be 21, 22, 45, 66, 109... etc) . For interpretation, I would like to bin this variable into lengths of 10 such that the new variable YBIN is 1=20-30, 2=31-40, 3=41-50, 4=51-60... and so on, up to 270. A value of 266 would fall into the bin of 261-270.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried proc rank and proc hpbin, but it doesn't seem like either allows you to select the width of your bin (only the number of total bins).&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've also looked at this but don't fully understand the do loop.&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Programming/binning-a-continuous-variable-for-further-analysis/m-p/564608#M158393" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/binning-a-continuous-variable-for-further-analysis/m-p/564608#M158393&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 14:37:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-bins-of-specified-width/m-p/575821#M162933</guid>
      <dc:creator>ly2105</dc:creator>
      <dc:date>2019-07-23T14:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: Create bins of specified width</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-bins-of-specified-width/m-p/575830#M162936</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ybin = floor((y-1)/10) - 1;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Jul 2019 15:00:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-bins-of-specified-width/m-p/575830#M162936</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-07-23T15:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: Create bins of specified width</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-bins-of-specified-width/m-p/575870#M162955</link>
      <description>Thanks- what is the purpose of subtracting 1?</description>
      <pubDate>Tue, 23 Jul 2019 15:54:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-bins-of-specified-width/m-p/575870#M162955</guid>
      <dc:creator>ly2105</dc:creator>
      <dc:date>2019-07-23T15:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: Create bins of specified width</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-bins-of-specified-width/m-p/575890#M162957</link>
      <description>&lt;P&gt;In your original statement of the problem, you said you wanted&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;1=20-30, 2=31-40, 3=41-50, 4=51-60&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you don't subtract 1, you don't get these values. Although, from a purely practical point of view, subtracting 1 shouldn't affect the regression you are going to do, and so subtracting 1 could be omitted without any negative effects.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 16:47:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-bins-of-specified-width/m-p/575890#M162957</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-07-23T16:47:53Z</dc:date>
    </item>
  </channel>
</rss>

