<?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: Count different kinds of missing values for numerical variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Count-different-kinds-of-missing-values-for-numerical-variable/m-p/709576#M218235</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/222710"&gt;@riccardo88&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or use PROC FREQ:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=have;
tables var / missing;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can restrict the counts to missing values by adding a WHERE statement to this step, e.g.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where missing(var);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Jan 2021 09:36:28 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2021-01-06T09:36:28Z</dc:date>
    <item>
      <title>Count different kinds of missing values for numerical variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Count-different-kinds-of-missing-values-for-numerical-variable/m-p/709573#M218232</link>
      <description>&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;I have a dataset of this kind:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;                    
input var;
datalines; 
34
54
.a
.b
65
.b
; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;As you can see I have different kinds of missing values identified with "A" and "B".&lt;/P&gt;&lt;P&gt;I would like to know how many A and B missing values are there:&lt;/P&gt;&lt;P&gt;e.g. A: 1; B: 2&lt;/P&gt;&lt;P&gt;Does anybody know how?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS Version: 9.4&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2021 09:31:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Count-different-kinds-of-missing-values-for-numerical-variable/m-p/709573#M218232</guid>
      <dc:creator>riccardo88</dc:creator>
      <dc:date>2021-01-06T09:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Count different kinds of missing values for numerical variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Count-different-kinds-of-missing-values-for-numerical-variable/m-p/709575#M218234</link>
      <description>&lt;P&gt;You can use Proc Summary with the Missing Option like this. The _FREQ_ Variables gives you the answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;                    
input var;
datalines; 
34
54
.a
.b
65
.b
; 

proc summary data = have missing nway;
   class var;
   output out=want;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Obs  var  _TYPE_  _FREQ_ 
1    A    1       1 
2    B    1       2 
3    34   1       1 
4    54   1       1 
5    65   1       1 &lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Jan 2021 09:36:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Count-different-kinds-of-missing-values-for-numerical-variable/m-p/709575#M218234</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-01-06T09:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: Count different kinds of missing values for numerical variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Count-different-kinds-of-missing-values-for-numerical-variable/m-p/709576#M218235</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/222710"&gt;@riccardo88&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or use PROC FREQ:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=have;
tables var / missing;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can restrict the counts to missing values by adding a WHERE statement to this step, e.g.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where missing(var);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2021 09:36:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Count-different-kinds-of-missing-values-for-numerical-variable/m-p/709576#M218235</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2021-01-06T09:36:28Z</dc:date>
    </item>
  </channel>
</rss>

