<?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 NEED CONSECUTIVE DATA ONLY in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/NEED-CONSECUTIVE-DATA-ONLY/m-p/93031#M26472</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THANKS &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Apr 2012 13:23:23 GMT</pubDate>
    <dc:creator>spraynardz90</dc:creator>
    <dc:date>2012-04-24T13:23:23Z</dc:date>
    <item>
      <title>NEED CONSECUTIVE DATA ONLY</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/NEED-CONSECUTIVE-DATA-ONLY/m-p/93031#M26472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THANKS &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2012 13:23:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/NEED-CONSECUTIVE-DATA-ONLY/m-p/93031#M26472</guid>
      <dc:creator>spraynardz90</dc:creator>
      <dc:date>2012-04-24T13:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: NEED CONSECUTIVE DATA ONLY</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/NEED-CONSECUTIVE-DATA-ONLY/m-p/93032#M26473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As a SAS layman, you will have a lot to learn to answer even the basic questions that you are asking.&amp;nbsp; I will get you started, but can't possibly present all the tools you will need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, I have to assume you already have a SAS data set although you don't explicitly name the data set or any of the variables within it.&amp;nbsp; Here are some tools that will serve you well in general, and will start the ball rolling.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, create a SAS data set holding a count of how many observations exist for each FIRM:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc freq data=full_dataset;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; tables firm / noprint out=firm_counts (keep=firm count);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next, merge this back onto the original data, and subset the observations:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data=full_dataset;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; by firm;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data subset;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; merge full_dataset firm_counts;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; by firm;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if count &amp;gt;= 40;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will generate another SAS data set holding just the FIRMs with at least 40 observations.&amp;nbsp; That seems to be part of what you asked for.&amp;nbsp; There is a lot more to it, as noted below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have data from 1970 through 2010, you might have 41 observations rather than 40 for some firms.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just because there are 40 observations, for a firm, it doesn't mean you have consecutive years.&amp;nbsp; There could be 40 observations all for the same firm for the same year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just because you have 40 observations, it doesn't mean they all contain valid data.&amp;nbsp; There could be blanks in many of the variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will take a lot of work on your part to be able to address all of these questions.&amp;nbsp; I'm hoping this will get you started.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2012 14:25:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/NEED-CONSECUTIVE-DATA-ONLY/m-p/93032#M26473</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-04-24T14:25:15Z</dc:date>
    </item>
  </channel>
</rss>

