<?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: Re-catorgorize data into new variables in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Re-catorgorize-data-into-new-variables/m-p/427379#M68449</link>
    <description>&lt;P&gt;Low is not a variable. It is a formatted value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your goal is to do a regression on just the low values, none of the formatting is needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc Reg data=Import(where=(0&amp;lt;=cd4&amp;lt;=200));
title "Example of linear regression";
model Factor1 = cd4;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;P.S.: It is always helpful to say what analysis you would like to do in your original post. &lt;/P&gt;</description>
    <pubDate>Fri, 12 Jan 2018 22:00:56 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2018-01-12T22:00:56Z</dc:date>
    <item>
      <title>Re-catorgorize data into new variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Re-catorgorize-data-into-new-variables/m-p/427373#M68444</link>
      <description>&lt;P&gt;I'm trying to organize a continuous variable into smaller blocks. For example. Im using CD4 counts 1-1500. I want to break the CD4 count variable into smaller blocks for analyzation. 1-200 would be low CD4. 201-500 would be medium CD4 level and 501 and above would be high CD4 level.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what code would I use to do this, if it could be done?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2018 21:22:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Re-catorgorize-data-into-new-variables/m-p/427373#M68444</guid>
      <dc:creator>UGAstudent</dc:creator>
      <dc:date>2018-01-12T21:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: Re-catorgorize data into new variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Re-catorgorize-data-into-new-variables/m-p/427375#M68445</link>
      <description>&lt;P&gt;Use proc format aka user defined format&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This link might be of help--&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://stats.idre.ucla.edu/wp-content/uploads/2016/02/bt3001.pdf" target="_blank"&gt;https://stats.idre.ucla.edu/wp-content/uploads/2016/02/bt3001.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/sugi27/p056-27.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi27/p056-27.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2018 21:32:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Re-catorgorize-data-into-new-variables/m-p/427375#M68445</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-01-12T21:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: Re-catorgorize data into new variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Re-catorgorize-data-into-new-variables/m-p/427376#M68447</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/149337"&gt;@UGAstudent&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I'm trying to organize a continuous variable into smaller blocks. For example. Im using CD4 counts 1-1500. I want to break the CD4 count variable into smaller blocks for analyzation. 1-200 would be low CD4. 201-500 would be medium CD4 level and 501 and above would be high CD4 level.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;what code would I use to do this, if it could be done?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;An example:&lt;/P&gt;
&lt;PRE&gt;proc format library=work;
/* Format names cannot end in a digit to
   avoid confusion with display length options
*/
value cd4_
0  -  200 = 'Low'
200&amp;lt;- 500 = 'Medium'
500&amp;lt;-high = 'High'
;
run;

proc freq data=yourdata;
  tables cd4;
  format cd4 cd4_. ;
run;&lt;/PRE&gt;
&lt;P&gt;Formats are very powerful tools as you can create multiple formats and use as needed. Almost all of the analysis procedures will honor groupings assigned in custom formats.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2018 23:10:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Re-catorgorize-data-into-new-variables/m-p/427376#M68447</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-01-12T23:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: Re-catorgorize data into new variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Re-catorgorize-data-into-new-variables/m-p/427378#M68448</link>
      <description>&lt;P&gt;This worked well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, Im trying to do a linear regression but it says the newly created variables are not found?&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc Reg data=Import;
title "Example of linear regression";
model Factor1 = Low;
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2018 21:54:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Re-catorgorize-data-into-new-variables/m-p/427378#M68448</guid>
      <dc:creator>UGAstudent</dc:creator>
      <dc:date>2018-01-12T21:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: Re-catorgorize data into new variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Re-catorgorize-data-into-new-variables/m-p/427379#M68449</link>
      <description>&lt;P&gt;Low is not a variable. It is a formatted value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your goal is to do a regression on just the low values, none of the formatting is needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc Reg data=Import(where=(0&amp;lt;=cd4&amp;lt;=200));
title "Example of linear regression";
model Factor1 = cd4;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;P.S.: It is always helpful to say what analysis you would like to do in your original post. &lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2018 22:00:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Re-catorgorize-data-into-new-variables/m-p/427379#M68449</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-01-12T22:00:56Z</dc:date>
    </item>
  </channel>
</rss>

