<?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 filtering data set using proc freq count in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/filtering-data-set-using-proc-freq-count/m-p/193334#M266287</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm fairly new to SAS but was wondering if there is a way to delete observations by frequency count?&amp;nbsp; For example, I used proc freq to generate a count of all diagnosis codes but all frequency counts&amp;lt;=5, I want to remove from the dataset.&amp;nbsp; Is this possible?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 May 2015 19:17:12 GMT</pubDate>
    <dc:creator>kparker</dc:creator>
    <dc:date>2015-05-26T19:17:12Z</dc:date>
    <item>
      <title>filtering data set using proc freq count</title>
      <link>https://communities.sas.com/t5/SAS-Programming/filtering-data-set-using-proc-freq-count/m-p/193334#M266287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm fairly new to SAS but was wondering if there is a way to delete observations by frequency count?&amp;nbsp; For example, I used proc freq to generate a count of all diagnosis codes but all frequency counts&amp;lt;=5, I want to remove from the dataset.&amp;nbsp; Is this possible?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 19:17:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/filtering-data-set-using-proc-freq-count/m-p/193334#M266287</guid>
      <dc:creator>kparker</dc:creator>
      <dc:date>2015-05-26T19:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: filtering data set using proc freq count</title>
      <link>https://communities.sas.com/t5/SAS-Programming/filtering-data-set-using-proc-freq-count/m-p/193335#M266288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There's going to be a lot of different ways to get this result.&amp;nbsp; One way is to use the out= statement in your proc freq.&amp;nbsp; This will get you a dataset with the result that you can manipulate anyway you want:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc freq data= have;table variable /out=want;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 19:37:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/filtering-data-set-using-proc-freq-count/m-p/193335#M266288</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2015-05-26T19:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: filtering data set using proc freq count</title>
      <link>https://communities.sas.com/t5/SAS-Programming/filtering-data-set-using-proc-freq-count/m-p/193336#M266289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For example,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have over 500,000 observations in this dataset.&lt;/P&gt;&lt;P&gt;I already have my data filtered for the columns I need but for the diagnosis column, I ran a proc freq.&lt;/P&gt;&lt;P&gt;My Proc Freq data looks like:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 233px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="40" width="156"&gt;DIAGNOSIS_PRIN_CD&lt;/TD&gt;&lt;TD class="xl67" style="border-left-color: currentColor; border-left-width: medium; border-left-style: none;" width="77"&gt;Frequency&lt;/TD&gt;&lt;TD class="xl65" height="40" width="156"&gt;DIAGNOSIS_PRIN_CD&lt;/TD&gt;&lt;TD class="xl67" style="border-left-color: currentColor; border-left-width: medium; border-left-style: none;" width="77"&gt;Frequency&lt;/TD&gt;&lt;TD class="xl66" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;"&gt;V3000&lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;32677&lt;/TD&gt;&lt;TD class="xl66" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;"&gt;V3001&lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;21109&lt;/TD&gt;&lt;TD class="xl66" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;"&gt;486&lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;15683&lt;/TD&gt;&lt;TD class="xl66" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;"&gt;389&lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;10455&lt;/TD&gt;&lt;TD class="xl66" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;"&gt;V3000&lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;32677&lt;/TD&gt;&lt;TD class="xl66" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;"&gt;V3001&lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;21109&lt;/TD&gt;&lt;TD class="xl66" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;"&gt;486&lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;15683&lt;/TD&gt;&lt;TD class="xl66" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;"&gt;389&lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;10455&lt;/TD&gt;&lt;TD class="xl66" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;"&gt;7778&lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;2&lt;/TD&gt;&lt;TD class="xl66" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;"&gt;7915&lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;3&lt;/TD&gt;&lt;TD class="xl66" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;"&gt;7672&lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl66" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;"&gt;861&lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to suppress or result any diagnosis code that has a frequency count &amp;lt;=5 with Blank or '.'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am thinking about creating a data step and using IF-THEN statements to accomplish this task but it will be very time consuming.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 19:45:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/filtering-data-set-using-proc-freq-count/m-p/193336#M266289</guid>
      <dc:creator>kparker</dc:creator>
      <dc:date>2015-05-26T19:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: filtering data set using proc freq count</title>
      <link>https://communities.sas.com/t5/SAS-Programming/filtering-data-set-using-proc-freq-count/m-p/193337#M266290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;proc freq&lt;/STRONG&gt; might not be the best tool for data management. I would use &lt;STRONG&gt;proc SQL&lt;/STRONG&gt; :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc sql;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;create table want as&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;select * from have&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;group by diagnosisCode&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;having count(*) &amp;gt; 5;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;quit;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 19:46:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/filtering-data-set-using-proc-freq-count/m-p/193337#M266290</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-05-26T19:46:16Z</dc:date>
    </item>
  </channel>
</rss>

