<?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: Help with getting the average ? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-the-average/m-p/211597#M52258</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As far as I am awre you can't put aggregate functions in a format step.&amp;nbsp; If you want to get means, then look at proc means:&lt;/P&gt;&lt;P&gt;proc means data=have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var age;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output out=want mean=mean;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Jul 2015 12:22:10 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2015-07-27T12:22:10Z</dc:date>
    <item>
      <title>Help with getting the average ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-the-average/m-p/211596#M52257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Value $age (multilabel notsorted)&lt;/P&gt;&lt;P&gt;&amp;nbsp; LOW - HIGH&amp;nbsp; = "Persons of all ages"&lt;/P&gt;&lt;P&gt;&amp;nbsp; '000'-'004' = "Pre-school children (0-4 years)"&lt;/P&gt;&lt;P&gt;&amp;nbsp; '005'-'012' = "Primary school children (5-12 years)"&lt;/P&gt;&lt;P&gt;&amp;nbsp; '013'-'018' = "Teenagers (13-18 years)"&lt;/P&gt;&lt;P&gt;&amp;nbsp; '019'-'024' = "Young adults (19-24 years)"&lt;/P&gt;&lt;P&gt;&amp;nbsp; '025'-'034' = "Persons ages 25-34 years"&lt;/P&gt;&lt;P&gt;&amp;nbsp; '035'-'044' = "Persons ages 35-44 years"&lt;/P&gt;&lt;P&gt;&amp;nbsp; '045'-'054' = "Persons ages 45-54 years"&lt;/P&gt;&lt;P&gt;&amp;nbsp; '055'-'064' = "Persons ages 55-64 years"&lt;/P&gt;&lt;P&gt;&amp;nbsp; '065'-'074' = "Persons ages 65-74 years"&lt;/P&gt;&lt;P&gt;&amp;nbsp; '075'-high&amp;nbsp; = "Persons ages 75 years and over" &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; mean (of low-high) = "Average" ; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bold is where the mistake lies.&lt;/P&gt;&lt;P&gt;Very new to SAS and couldn't figure it out and it was just a guess idea from reading things online. Why won't this work? &lt;/P&gt;&lt;P&gt;And if possible how to I fix it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 12:03:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-the-average/m-p/211596#M52257</guid>
      <dc:creator>Gryphxn</dc:creator>
      <dc:date>2015-07-27T12:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Help with getting the average ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-the-average/m-p/211597#M52258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As far as I am awre you can't put aggregate functions in a format step.&amp;nbsp; If you want to get means, then look at proc means:&lt;/P&gt;&lt;P&gt;proc means data=have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var age;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output out=want mean=mean;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 12:22:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-the-average/m-p/211597#M52258</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-07-27T12:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: Help with getting the average ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-the-average/m-p/211598#M52259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A second issue: your format indicates the age variable is text. Means of text aren't going to calculate unless you convert them to numeric. For your format manually calculate it. I wouldn't expect to see that unless you are planning on using a procedure that uses preloadfmt.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 15:54:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-with-getting-the-average/m-p/211598#M52259</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-07-27T15:54:27Z</dc:date>
    </item>
  </channel>
</rss>

