<?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: exclude observations from reslults in proc tabulate in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/exclude-observations-from-reslults-in-proc-tabulate/m-p/388475#M65927</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/154111"&gt;@bemariec&lt;/a&gt; wrote:&lt;BR /&gt;Sorry! yess! Missing values are excluded Except for n ans nmiss, where missing values are included&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you need to say something about which specific variables you&amp;nbsp; are discussing as CLASS variables with missing values are excluded:&lt;/P&gt;
&lt;PRE&gt;data junk;
   input x;
datalines;
.
1
1
1
.
3
3
3
3
2
;
run;

proc tabulate data=junk;
   class x;
   table x all,n;
run;&lt;/PRE&gt;
&lt;P&gt;10 obs in, 8 reported on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tabulate by default will exclude all rows with ANY of the class variables missing.&lt;/P&gt;
&lt;P&gt;So when you look at individual variables such as with proc means or freq the class variables values will ALL show.&lt;/P&gt;
&lt;PRE&gt;data junk;
   input x y;
datalines;
. 1
1 2
1 3
1 .
. 5
3 1
3 1
3 .
3 1
2 1
;
run;

proc tabulate data=junk;
   class x Y;
   table x *y,n;
run;

proc means data=junk n;
   var x y;
run;&lt;/PRE&gt;
&lt;P&gt;Tabulate: 6 records, Means 8 values for each of x and y.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you might want to consider providing some example data and what the desired result is.&lt;/P&gt;</description>
    <pubDate>Thu, 17 Aug 2017 17:15:02 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2017-08-17T17:15:02Z</dc:date>
    <item>
      <title>exclude observations from reslults in proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/exclude-observations-from-reslults-in-proc-tabulate/m-p/388433#M65920</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to make a PROC TABULATE for a big amount of observations (60 000), and there are few missing values for some variables... I want to exclude these missing values from the stats I calculate, but I don't want to delete de rows! Some observations can be used for one variable and not the other... (n=6500 instead of 6480 (there are 20 missing values))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc tabulate data=Recyc.aqhc_cc;&lt;BR /&gt;class &amp;nbsp; &amp;nbsp; groupe_enrobe&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Calibre &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; R;&lt;BR /&gt;var&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ecart_Ta_5&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ecart_Ta_080&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; ecart_TG&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; ecart_PourBitume;&lt;BR /&gt;table (groupe_enrobe)*(calibre),(R &amp;nbsp;&amp;nbsp; All)*(n)&amp;nbsp;&amp;nbsp; &amp;nbsp;(R&amp;nbsp;&amp;nbsp;&amp;nbsp; All)*(ecart_Ta_5&amp;nbsp;&amp;nbsp; &amp;nbsp;ecart_Ta_080&amp;nbsp;&amp;nbsp; &amp;nbsp;ecart_TG&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; ecart_PourBitume)*(std);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want n to be counted without missing values of variables... Same for std...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Marie-Christine&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 12:51:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/exclude-observations-from-reslults-in-proc-tabulate/m-p/388433#M65920</guid>
      <dc:creator>bemariec</dc:creator>
      <dc:date>2017-08-16T12:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: exclude observations from reslults in proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/exclude-observations-from-reslults-in-proc-tabulate/m-p/388434#M65921</link>
      <description>&lt;P&gt;As far as I know, PROC TABULATE does not include missings in its statistics, and furthermore the missing are not included in the calculation of N.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So as far as I can see, you don't need to do anything different.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 12:55:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/exclude-observations-from-reslults-in-proc-tabulate/m-p/388434#M65921</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-08-16T12:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: exclude observations from reslults in proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/exclude-observations-from-reslults-in-proc-tabulate/m-p/388435#M65922</link>
      <description>&lt;P&gt;Hi! thanks for the quick answer!&lt;/P&gt;&lt;P&gt;I thought the same, but when I did the proc capability statement, I found different n ans std... So I investigated, and I found 17 missing values (with proc means) for a particular variable and class... the "n" was not the right one in proc tabulate... &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 12:59:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/exclude-observations-from-reslults-in-proc-tabulate/m-p/388435#M65922</guid>
      <dc:creator>bemariec</dc:creator>
      <dc:date>2017-08-16T12:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: exclude observations from reslults in proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/exclude-observations-from-reslults-in-proc-tabulate/m-p/388446#M65924</link>
      <description>I found it! N is excluded EXCEPT for n and nmiss in proc tabulate! thank you!</description>
      <pubDate>Wed, 16 Aug 2017 13:28:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/exclude-observations-from-reslults-in-proc-tabulate/m-p/388446#M65924</guid>
      <dc:creator>bemariec</dc:creator>
      <dc:date>2017-08-16T13:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: exclude observations from reslults in proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/exclude-observations-from-reslults-in-proc-tabulate/m-p/388450#M65925</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/154111"&gt;@bemariec&lt;/a&gt; wrote:&lt;BR /&gt;I found it! N is excluded EXCEPT for n and nmiss in proc tabulate! thank you!&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I'm sorry but I don't understand this statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you mean that missing values are excluded?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 13:45:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/exclude-observations-from-reslults-in-proc-tabulate/m-p/388450#M65925</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-08-16T13:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: exclude observations from reslults in proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/exclude-observations-from-reslults-in-proc-tabulate/m-p/388454#M65926</link>
      <description>Sorry! yess! Missing values are excluded Except for n ans nmiss, where missing values are included</description>
      <pubDate>Wed, 16 Aug 2017 13:50:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/exclude-observations-from-reslults-in-proc-tabulate/m-p/388454#M65926</guid>
      <dc:creator>bemariec</dc:creator>
      <dc:date>2017-08-16T13:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: exclude observations from reslults in proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/exclude-observations-from-reslults-in-proc-tabulate/m-p/388475#M65927</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/154111"&gt;@bemariec&lt;/a&gt; wrote:&lt;BR /&gt;Sorry! yess! Missing values are excluded Except for n ans nmiss, where missing values are included&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you need to say something about which specific variables you&amp;nbsp; are discussing as CLASS variables with missing values are excluded:&lt;/P&gt;
&lt;PRE&gt;data junk;
   input x;
datalines;
.
1
1
1
.
3
3
3
3
2
;
run;

proc tabulate data=junk;
   class x;
   table x all,n;
run;&lt;/PRE&gt;
&lt;P&gt;10 obs in, 8 reported on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tabulate by default will exclude all rows with ANY of the class variables missing.&lt;/P&gt;
&lt;P&gt;So when you look at individual variables such as with proc means or freq the class variables values will ALL show.&lt;/P&gt;
&lt;PRE&gt;data junk;
   input x y;
datalines;
. 1
1 2
1 3
1 .
. 5
3 1
3 1
3 .
3 1
2 1
;
run;

proc tabulate data=junk;
   class x Y;
   table x *y,n;
run;

proc means data=junk n;
   var x y;
run;&lt;/PRE&gt;
&lt;P&gt;Tabulate: 6 records, Means 8 values for each of x and y.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you might want to consider providing some example data and what the desired result is.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2017 17:15:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/exclude-observations-from-reslults-in-proc-tabulate/m-p/388475#M65927</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-08-17T17:15:02Z</dc:date>
    </item>
  </channel>
</rss>

