<?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 needed with excluding low frequency variables from data set in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Help-needed-with-excluding-low-frequency-variables-from-data-set/m-p/166853#M43209</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you just want the basic frequency count, you could use SQL:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select clinic, degree, count(*) as Freq&lt;/P&gt;&lt;P&gt;from plallbreeds&lt;/P&gt;&lt;P&gt;group by clinic, degree&lt;/P&gt;&lt;P&gt;order by clinic, degree;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Feb 2014 14:23:18 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2014-02-07T14:23:18Z</dc:date>
    <item>
      <title>Help needed with excluding low frequency variables from data set</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-needed-with-excluding-low-frequency-variables-from-data-set/m-p/166852#M43208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, bare with me here, I have only been using SAS for 2 weeks, so I realise some of my sentences will sound like soeone tying to learn a new language.&lt;/P&gt;&lt;P&gt;But here goes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have gathered data from our kennel club, one data set containing veterinary information (if the dog has a specific disease (PL= patellar luxation), and in that case, which degree, 0-3), and another 14 for each one of 14 breeds, containing names, registration numbers, lineage ect ect. I ended up with a dataset contaiing 250 000 observations, divided into 14 variables.&lt;/P&gt;&lt;P&gt;I have merged these files by breed code, registratio number, birth date and sex.&lt;/P&gt;&lt;P&gt;I have done some other ifs and formats to get what I want. So far so good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I proceeded to see how many examinations were done by each veterinarian (variable called clinic). Also I wanted to see the frequencies of degrees (variable = degree) between each veterinarian.&lt;/P&gt;&lt;P&gt;So I wrote the following;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc sort data=plallbreeds;&lt;/P&gt;&lt;P&gt;by clinic degree;&lt;/P&gt;&lt;P&gt;PROC FREQ Data=plallbreeds ORDER=FREQ;&lt;/P&gt;&lt;P&gt;Tables Degree;&lt;/P&gt;&lt;P&gt;By Clinic;&lt;/P&gt;&lt;P&gt;Title 'bla bla bla';&lt;/P&gt;&lt;P&gt;Run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And again, so far so good! Only problems is now that I have 390 veterinarians in my end result, and many of these have done less then 10 exams.&lt;/P&gt;&lt;P&gt;I would like to be able to exclude these from my output so I can better overview the result. &lt;/P&gt;&lt;P&gt;I have searched and searched but I just cant get the code right to do this.&lt;/P&gt;&lt;P&gt;Can someone here help me?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Feb 2014 13:45:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-needed-with-excluding-low-frequency-variables-from-data-set/m-p/166852#M43208</guid>
      <dc:creator>lupefine</dc:creator>
      <dc:date>2014-02-07T13:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: Help needed with excluding low frequency variables from data set</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-needed-with-excluding-low-frequency-variables-from-data-set/m-p/166853#M43209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you just want the basic frequency count, you could use SQL:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select clinic, degree, count(*) as Freq&lt;/P&gt;&lt;P&gt;from plallbreeds&lt;/P&gt;&lt;P&gt;group by clinic, degree&lt;/P&gt;&lt;P&gt;order by clinic, degree;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Feb 2014 14:23:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-needed-with-excluding-low-frequency-variables-from-data-set/m-p/166853#M43209</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2014-02-07T14:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: Help needed with excluding low frequency variables from data set</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Help-needed-with-excluding-low-frequency-variables-from-data-set/m-p/166854#M43210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are happy with what you have so far, except that you want to eliminate the low counts, here is a way to modify the approach.&amp;nbsp; Instead of printing the report with PROC FREQ, create a data set holding the results.&amp;nbsp; The modification would be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables degree / noprint out=clinic_counts;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use PROC PRINT to print selected observations.&amp;nbsp; For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc print data=clinic_counts;&lt;/P&gt;&lt;P&gt;&amp;nbsp; where count &amp;gt;= 10;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; *by, var, title statements as appropriate;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Feb 2014 15:51:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Help-needed-with-excluding-low-frequency-variables-from-data-set/m-p/166854#M43210</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2014-02-07T15:51:15Z</dc:date>
    </item>
  </channel>
</rss>

