<?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 Age Groups from Age Variable in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-Age-Groups-from-Age-Variable/m-p/370296#M24173</link>
    <description>&lt;P&gt;x1 = 0 le z2 le 14;&lt;/P&gt;
&lt;P&gt;x2 = 15 le z2 le 65;&lt;/P&gt;
&lt;P&gt;x3 = z2 gt 65;&lt;/P&gt;</description>
    <pubDate>Sat, 24 Jun 2017 20:22:08 GMT</pubDate>
    <dc:creator>WarrenKuhfeld</dc:creator>
    <dc:date>2017-06-24T20:22:08Z</dc:date>
    <item>
      <title>Creating Age Groups from Age Variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-Age-Groups-from-Age-Variable/m-p/370295#M24172</link>
      <description>&lt;P&gt;Hello team,&lt;/P&gt;&lt;P&gt;i am trying to group the variable "age" to assign a dummy with groupings 0-14 years, 15-65 years and above 65 years. My variable representing age is z2. How do I set the codes please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jun 2017 19:54:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-Age-Groups-from-Age-Variable/m-p/370295#M24172</guid>
      <dc:creator>jamuriuk</dc:creator>
      <dc:date>2017-06-24T19:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Age Groups from Age Variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-Age-Groups-from-Age-Variable/m-p/370296#M24173</link>
      <description>&lt;P&gt;x1 = 0 le z2 le 14;&lt;/P&gt;
&lt;P&gt;x2 = 15 le z2 le 65;&lt;/P&gt;
&lt;P&gt;x3 = z2 gt 65;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jun 2017 20:22:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-Age-Groups-from-Age-Variable/m-p/370296#M24173</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-06-24T20:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Age Groups from Age Variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-Age-Groups-from-Age-Variable/m-p/370299#M24174</link>
      <description>Thank you although I did not want to add extra variables x1, x2 and x3. I have apparently used&lt;BR /&gt;&lt;BR /&gt;if age &amp;lt;= 15 then z2=1;else if 12 &amp;lt;= age &amp;lt; 65 then z2=2;else if age &amp;gt;=65 then z2=3; and it has worked.&lt;BR /&gt;&lt;BR /&gt;Thanks so much.&lt;BR /&gt;&lt;BR /&gt;James&lt;BR /&gt;</description>
      <pubDate>Sat, 24 Jun 2017 20:29:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-Age-Groups-from-Age-Variable/m-p/370299#M24174</guid>
      <dc:creator>jamuriuk</dc:creator>
      <dc:date>2017-06-24T20:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Age Groups from Age Variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-Age-Groups-from-Age-Variable/m-p/370367#M24175</link>
      <description>&lt;PRE style="position: fixed; left: -1000px;"&gt;&lt;BR /&gt; proc format; value  age&lt;BR /&gt; &lt;BR /&gt; 0-14='0-14  '&lt;BR /&gt; 15-65='15-65'&lt;BR /&gt;  65-120='gt 65';&lt;BR /&gt;  &lt;BR /&gt;  &lt;BR /&gt;  data;   input name $ age ;&lt;BR /&gt;  &lt;BR /&gt;  format age age.;&lt;BR /&gt;  &lt;BR /&gt;  cards;&lt;BR /&gt;  mary 12&lt;BR /&gt;  joe  60&lt;BR /&gt;  ;&lt;BR /&gt;  &lt;BR /&gt;  proc print;  run&lt;/PRE&gt;
&lt;PRE style="position: fixed; left: -1000px;"&gt;&lt;BR /&gt; proc format; value  age&lt;BR /&gt; &lt;BR /&gt; 0-14='0-14  '&lt;BR /&gt; 15-65='15-65'&lt;BR /&gt;  65-120='gt 65';&lt;BR /&gt;  &lt;BR /&gt;  &lt;BR /&gt;  data;   input name $ age ;&lt;BR /&gt;  &lt;BR /&gt;  format age age.;&lt;BR /&gt;  &lt;BR /&gt;  cards;&lt;BR /&gt;  mary 12&lt;BR /&gt;  joe  60&lt;BR /&gt;  ;&lt;BR /&gt;  &lt;BR /&gt;  proc print;  run&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE style="position: fixed; left: -1000px;"&gt;&lt;BR /&gt; proc format; value  age&lt;BR /&gt; &lt;BR /&gt; 0-14='0-14  '&lt;BR /&gt; 15-65='15-65'&lt;BR /&gt;  65-120='gt 65';&lt;BR /&gt;  &lt;BR /&gt;  &lt;BR /&gt;  data;   input name $ age ;&lt;BR /&gt;  &lt;BR /&gt;  format age age.;&lt;BR /&gt;  &lt;BR /&gt;  cards;&lt;BR /&gt;  mary 12&lt;BR /&gt;  joe  60&lt;BR /&gt;  ;&lt;BR /&gt;  &lt;BR /&gt;  proc print;  run&lt;/PRE&gt;
&lt;P&gt;You can use proc format&amp;nbsp;&amp;nbsp; like this;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp;proc format; value&amp;nbsp; age&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;0-14='0-14&amp;nbsp; '&lt;BR /&gt;&amp;nbsp;15-65='15-65'&lt;BR /&gt;&amp;nbsp; 65-120='gt 65';&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; data;&amp;nbsp;&amp;nbsp; input name $ age ;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; format age age.;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; cards;&lt;BR /&gt;&amp;nbsp; mary 12&lt;BR /&gt;&amp;nbsp; joe&amp;nbsp; 60&lt;BR /&gt;&amp;nbsp; ;&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; proc print;&amp;nbsp; run&amp;nbsp;&lt;/P&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;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Sun, 25 Jun 2017 14:25:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-Age-Groups-from-Age-Variable/m-p/370367#M24175</guid>
      <dc:creator>Jim_G</dc:creator>
      <dc:date>2017-06-25T14:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Age Groups from Age Variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-Age-Groups-from-Age-Variable/m-p/370680#M24178</link>
      <description>&lt;P&gt;If you use formats such as &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/41031"&gt;@Jim_G&lt;/a&gt;&amp;nbsp;suggested then you can avoid adding variables to the data set for almost any analysis tasks. The groups assigned by a format will be used in almost all of the analysis procedures and have the very signficant advantage of if you want to see what the difference may be when you change the boundary for one of the categories you make a new custom format and use that in the procecure code for the age variable. No added variables and if you data is largish then you don't spend extra time with multiple data sets.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 17:54:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Creating-Age-Groups-from-Age-Variable/m-p/370680#M24178</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-06-26T17:54:06Z</dc:date>
    </item>
  </channel>
</rss>

