<?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: Subset data with number of records count in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Subset-data-with-number-of-records-count/m-p/666840#M199586</link>
    <description>&lt;P&gt;Another related question, in the dataset, now each subject has at least 4 records (up to the maximum of 6). I want to do another subset of only those subjects where the difference between the 2nd to 3rd, 3rd to 4th, 4th to 5th, etc., jumped great than 4 points from the previous one.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;</description>
    <pubDate>Fri, 03 Jul 2020 14:56:50 GMT</pubDate>
    <dc:creator>zimcom</dc:creator>
    <dc:date>2020-07-03T14:56:50Z</dc:date>
    <item>
      <title>Subset data with number of records count</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Subset-data-with-number-of-records-count/m-p/666835#M199583</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want; set have;&lt;BR /&gt;retain z;&lt;BR /&gt;if first.SUBJECT then z = 1;&lt;BR /&gt;else z = z + 1;&lt;BR /&gt;by SUBJECT;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After I run the above code, how can I remove the SUBJECT if last.SUBJECT is less than 3 (not the observation of "z LT 3", but the SUBJECT), which means if the SUBJECT has less than 4 records, then they will be deleted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks as always&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2020 14:20:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Subset-data-with-number-of-records-count/m-p/666835#M199583</guid>
      <dc:creator>zimcom</dc:creator>
      <dc:date>2020-07-03T14:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Subset data with number of records count</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Subset-data-with-number-of-records-count/m-p/666837#M199584</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table want as
  select *
  from have
  where subject not in (
    select subject from have group by subject having count(subject) le 4
  )
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 Jul 2020 14:27:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Subset-data-with-number-of-records-count/m-p/666837#M199584</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-07-03T14:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: Subset data with number of records count</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Subset-data-with-number-of-records-count/m-p/666839#M199585</link>
      <description>Thank you so much, really appreciated!</description>
      <pubDate>Fri, 03 Jul 2020 14:35:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Subset-data-with-number-of-records-count/m-p/666839#M199585</guid>
      <dc:creator>zimcom</dc:creator>
      <dc:date>2020-07-03T14:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: Subset data with number of records count</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Subset-data-with-number-of-records-count/m-p/666840#M199586</link>
      <description>&lt;P&gt;Another related question, in the dataset, now each subject has at least 4 records (up to the maximum of 6). I want to do another subset of only those subjects where the difference between the 2nd to 3rd, 3rd to 4th, 4th to 5th, etc., jumped great than 4 points from the previous one.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2020 14:56:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Subset-data-with-number-of-records-count/m-p/666840#M199586</guid>
      <dc:creator>zimcom</dc:creator>
      <dc:date>2020-07-03T14:56:50Z</dc:date>
    </item>
  </channel>
</rss>

