<?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: Recording number of observations by group using PROC FREQ in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Recording-number-of-observations-by-group-using-PROC-FREQ/m-p/250974#M56658</link>
    <description>&lt;P&gt;I don't think so.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are other short cuts that can be used, look up SAS variable lists and short cuts.&lt;/P&gt;
&lt;P&gt;Arrays are also good to know.&lt;/P&gt;</description>
    <pubDate>Thu, 18 Feb 2016 22:01:42 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-02-18T22:01:42Z</dc:date>
    <item>
      <title>Recording number of observations by group using PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Recording-number-of-observations-by-group-using-PROC-FREQ/m-p/250948#M56652</link>
      <description>&lt;P&gt;I am very new to SAS and am looking for help with a very basic task.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have figured out how to count the number of observations in a dataset by group, or to display the counts using proc freq. How would I go about storing the information (for example, number of observations coming from group 4) so that I can use it later on? For example, if I determined that 134 observations come from group 4, how could I store this information so that I can use the number later on in some computations? Could I do this simultaneously for the counts coming from all groups?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to do this with proc freq? Is there a basic way to do it without this procedure?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2016 20:32:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Recording-number-of-observations-by-group-using-PROC-FREQ/m-p/250948#M56652</guid>
      <dc:creator>sasman</dc:creator>
      <dc:date>2016-02-18T20:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: Recording number of observations by group using PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Recording-number-of-observations-by-group-using-PROC-FREQ/m-p/250950#M56653</link>
      <description>&lt;P&gt;Use the OUT option in the TABLES statement&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=sashelp.class noprint;
table age/out=num_age;
run;

proc print data=num_age;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Feb 2016 20:37:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Recording-number-of-observations-by-group-using-PROC-FREQ/m-p/250950#M56653</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-02-18T20:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: Recording number of observations by group using PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Recording-number-of-observations-by-group-using-PROC-FREQ/m-p/250962#M56656</link>
      <description>&lt;P&gt;Thanks, that makes sense.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A followup question: say our data had age as a categorical variable (1 if someone is age 10-19, 2 if age is 20-29, etc). Is there a way I can use the value of the number of those with age=2 in computations, by writing something like "num_age[2]"?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2016 20:56:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Recording-number-of-observations-by-group-using-PROC-FREQ/m-p/250962#M56656</guid>
      <dc:creator>sasman</dc:creator>
      <dc:date>2016-02-18T20:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: Recording number of observations by group using PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Recording-number-of-observations-by-group-using-PROC-FREQ/m-p/250974#M56658</link>
      <description>&lt;P&gt;I don't think so.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are other short cuts that can be used, look up SAS variable lists and short cuts.&lt;/P&gt;
&lt;P&gt;Arrays are also good to know.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2016 22:01:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Recording-number-of-observations-by-group-using-PROC-FREQ/m-p/250974#M56658</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-02-18T22:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: Recording number of observations by group using PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Recording-number-of-observations-by-group-using-PROC-FREQ/m-p/251020#M56661</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/71308"&gt;@sasman&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Thanks, that makes sense.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A followup question: say our data had age as a categorical variable (1 if someone is age 10-19, 2 if age is 20-29, etc). Is there a way I can use the value of the number of those with age=2 in computations, by writing something like "num_age[2]"?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You might consider expanding on exactly what you are attempting, what some input data would look like and the desired output. That would be a significantly different post and you should ask a separate question with an appropriate title. The type of numeric computation and what the result could mean would go a long way to providing a cleaner solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the original question has been adequately answered please mark the post gave the answer as the correct solution so others know the original question has been resolved.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2016 04:43:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Recording-number-of-observations-by-group-using-PROC-FREQ/m-p/251020#M56661</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-02-19T04:43:50Z</dc:date>
    </item>
  </channel>
</rss>

