<?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: 0 observations after recoding or deleting values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/0-observations-after-recoding-or-deleting-values/m-p/602668#M174504</link>
    <description>Your program uses INDFMPIR but doesn't change it in any way.&lt;BR /&gt;&lt;BR /&gt;Therefore you need to go back to your original data set and look for missing values there.  &lt;BR /&gt;&lt;BR /&gt;Perhaps the incoming values for INDFMPIR are incorrect.</description>
    <pubDate>Fri, 08 Nov 2019 03:12:46 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2019-11-08T03:12:46Z</dc:date>
    <item>
      <title>0 observations after recoding or deleting values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/0-observations-after-recoding-or-deleting-values/m-p/602660#M174500</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am dealing with an error that produces 0 observations in my newly formed data set once I use "then delete" statement for missing data or if I want to delete unusual values. Why would that be? I pasted the code below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data NHANES05.cycle_full;&lt;BR /&gt;set NHANES05.NHANES_0506_full_b;&lt;BR /&gt;/*Poverty Income Ratio*/&lt;BR /&gt;if INDFMPIR&amp;lt;=0.99 then poorcat1=1; else poorcat1=0;&lt;BR /&gt;if INDFMPIR&amp;gt;1 and INDFMPIR&amp;lt;=1.99 then poorcat2=1; else poorcat2=0;&lt;BR /&gt;if INDFMPIR&amp;gt;2 and INDFMPIR&amp;lt;=2.99 then poorcat3=1; else poorcat3=0;&lt;BR /&gt;if INDFMPIR&amp;gt;3 and INDFMPIR&amp;lt;=3.99 then poorcat4=1; else poorcat4=0;&lt;BR /&gt;if INDFMPIR&amp;gt;4 and INDFMPIR&amp;lt;=4.99 then poorcat5=1; else poorcat5=0;&lt;BR /&gt;if INDFMPIR&amp;gt;5 then poorcat6=1; else poorcat6=0;&lt;BR /&gt;if INDFMPIR=. then poorcat=.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;**delete missing data;&lt;BR /&gt;data NHANES05.cycle_full_a;&lt;BR /&gt;set NHANES05.cycle_full;&lt;/P&gt;&lt;P&gt;/*Poverty Income Ratio*/&lt;BR /&gt;if INDFMPIR&amp;gt;=0 and INDFMPIR&amp;lt;=5 then poor1=1; else poor1=0;&lt;BR /&gt;if INDFMPIR=. then delete; *none based on this code but outside of the 0-5, N=72 coded as missing;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2019 01:52:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/0-observations-after-recoding-or-deleting-values/m-p/602660#M174500</guid>
      <dc:creator>maciulei</dc:creator>
      <dc:date>2019-11-08T01:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: 0 observations after recoding or deleting values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/0-observations-after-recoding-or-deleting-values/m-p/602666#M174503</link>
      <description>&lt;P&gt;A few things, when you do "&amp;lt;=0.99" that is different than later when you specify "&amp;gt;=0". Also, I think you may have observations that are exactly equal to 1,2,3,4,5 but your bucketing does not capture them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Given that I think you are trying to bucket the observations, I would use proc format instead. (if you don't want to include 1, 2, 3, etc. change 1-1.99 to 1&amp;lt;-1.99, 2-2.99 to 2&amp;lt;-2.99 etc.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
	value poorcat low-0.99=1 1-1.99=2 2-2.99=3 3-3.99=4 4-4.99=5 5-5.99=6 other=0;
run;

data have;
	set sashelp.syr1001(keep=S0666);
	poor_cat=put(S0666, poorcat.);
run;

data want;
	set have;
	if poor_cat ne 0;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;-unison&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2019 02:58:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/0-observations-after-recoding-or-deleting-values/m-p/602666#M174503</guid>
      <dc:creator>unison</dc:creator>
      <dc:date>2019-11-08T02:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: 0 observations after recoding or deleting values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/0-observations-after-recoding-or-deleting-values/m-p/602668#M174504</link>
      <description>Your program uses INDFMPIR but doesn't change it in any way.&lt;BR /&gt;&lt;BR /&gt;Therefore you need to go back to your original data set and look for missing values there.  &lt;BR /&gt;&lt;BR /&gt;Perhaps the incoming values for INDFMPIR are incorrect.</description>
      <pubDate>Fri, 08 Nov 2019 03:12:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/0-observations-after-recoding-or-deleting-values/m-p/602668#M174504</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-11-08T03:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: 0 observations after recoding or deleting values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/0-observations-after-recoding-or-deleting-values/m-p/602680#M174510</link>
      <description>&lt;P&gt;What does the log of both steps say? Please post it, using the {i} button.&lt;/P&gt;
&lt;P&gt;Also inspect the contents of&amp;nbsp;&lt;SPAN&gt;INDFMPIR in your initial dataset.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2019 07:29:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/0-observations-after-recoding-or-deleting-values/m-p/602680#M174510</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-11-08T07:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: 0 observations after recoding or deleting values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/0-observations-after-recoding-or-deleting-values/m-p/602759#M174549</link>
      <description>I checked the log and one of the imported files gave the error that the file is sequential in red. I fixed the issue by checking the file location, which was wrong. Now everything works!</description>
      <pubDate>Fri, 08 Nov 2019 15:59:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/0-observations-after-recoding-or-deleting-values/m-p/602759#M174549</guid>
      <dc:creator>maciulei</dc:creator>
      <dc:date>2019-11-08T15:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: 0 observations after recoding or deleting values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/0-observations-after-recoding-or-deleting-values/m-p/602763#M174551</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/298744"&gt;@maciulei&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I checked the log and one of the imported files gave the error that the file is sequential in red. I fixed the issue by checking the file location, which was wrong. Now everything works!&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That's why Maxim 2 is so high up on the list.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2019 16:10:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/0-observations-after-recoding-or-deleting-values/m-p/602763#M174551</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-11-08T16:10:47Z</dc:date>
    </item>
  </channel>
</rss>

