<?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 Eliminate observations for certain conditions in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Eliminate-observations-for-certain-conditions/m-p/593382#M15511</link>
    <description>&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;Hi All,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;My &lt;SPAN style="background: white;"&gt;&lt;SPAN style="-webkit-text-stroke-width: 0px; float: none; word-spacing: 0px;"&gt;dataset has a year identifier -- fyear, a &lt;/SPAN&gt;&lt;SPAN style="-webkit-text-stroke-width: 0px; cursor: text; float: none; word-spacing: 0px;"&gt;two-digit industry code -- sid2d and the variable interested -- Resid.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;I want to eliminate observations where there are fewer than ten observations in a two-digit industry code (sid2d) for a given year (fyear).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;Can anyone tell me how to write the codes for this? Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;Jiaxin&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 02 Oct 2019 14:23:04 GMT</pubDate>
    <dc:creator>jiaxinyang</dc:creator>
    <dc:date>2019-10-02T14:23:04Z</dc:date>
    <item>
      <title>Eliminate observations for certain conditions</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Eliminate-observations-for-certain-conditions/m-p/593382#M15511</link>
      <description>&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;Hi All,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;My &lt;SPAN style="background: white;"&gt;&lt;SPAN style="-webkit-text-stroke-width: 0px; float: none; word-spacing: 0px;"&gt;dataset has a year identifier -- fyear, a &lt;/SPAN&gt;&lt;SPAN style="-webkit-text-stroke-width: 0px; cursor: text; float: none; word-spacing: 0px;"&gt;two-digit industry code -- sid2d and the variable interested -- Resid.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;I want to eliminate observations where there are fewer than ten observations in a two-digit industry code (sid2d) for a given year (fyear).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;Can anyone tell me how to write the codes for this? Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;Jiaxin&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2019 14:23:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Eliminate-observations-for-certain-conditions/m-p/593382#M15511</guid>
      <dc:creator>jiaxinyang</dc:creator>
      <dc:date>2019-10-02T14:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminate observations for certain conditions</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Eliminate-observations-for-certain-conditions/m-p/593505#M15528</link>
      <description>&lt;P&gt;Try something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table want as
select *
from myDataset
group by sid2d, fyear
having count(*) &amp;gt;= 10;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 Oct 2019 18:34:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Eliminate-observations-for-certain-conditions/m-p/593505#M15528</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-10-02T18:34:27Z</dc:date>
    </item>
  </channel>
</rss>

