<?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: How to include the missing value? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-include-the-missing-value/m-p/848216#M42014</link>
    <description>&lt;P&gt;Do you mean missing values of PT_CLASS?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can add the MISSING option to the PROC TABULATE statement.&lt;/P&gt;</description>
    <pubDate>Tue, 06 Dec 2022 22:09:44 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2022-12-06T22:09:44Z</dc:date>
    <item>
      <title>How to include the missing value?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-include-the-missing-value/m-p/848213#M42013</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;Please let me know how to proceed if I want to include the missing value in the calculation variables (ED ICU Regular Physician Lab Radiology Pharma Thera).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc tabulate data=have out=want;
  var ED ICU Regular Physician Lab Radiology Pharma Thera;
  class PT_class;
  table (ED ICU Regular Physician Lab Radiology Pharma Thera), (PT_class all)*((N mean median p25 p75 sum));
  format PT_class PT_class.; 	
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Dec 2022 21:51:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-include-the-missing-value/m-p/848213#M42013</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2022-12-06T21:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to include the missing value?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-include-the-missing-value/m-p/848216#M42014</link>
      <description>&lt;P&gt;Do you mean missing values of PT_CLASS?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can add the MISSING option to the PROC TABULATE statement.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2022 22:09:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-include-the-missing-value/m-p/848216#M42014</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2022-12-06T22:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to include the missing value?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-include-the-missing-value/m-p/848224#M42016</link>
      <description>&lt;P&gt;How do you want the "missing values" for the Var variables included? You can get a count of the missing values using the NMISS statistic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;proc tabulate data=have out=want;
  var ED ICU Regular Physician Lab Radiology Pharma Thera;
  class PT_class;
  table (ED ICU Regular Physician Lab Radiology Pharma Thera), (PT_class all)*((N mean median p25 p75 sum nmiss));
  format PT_class PT_class.; 	
run;&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 06 Dec 2022 23:22:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-include-the-missing-value/m-p/848224#M42016</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-12-06T23:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to include the missing value?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-include-the-missing-value/m-p/848251#M42017</link>
      <description>&lt;P&gt;I have missing values in all the variables to be calculated.&amp;nbsp; To get the average of them, I would like to include the count of the missing values in the denominator.&amp;nbsp; Maybe I should use another step to do this separately cause the code is used to count all the non-missing values.&amp;nbsp; Right?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 01:21:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-include-the-missing-value/m-p/848251#M42017</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2022-12-07T01:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to include the missing value?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-include-the-missing-value/m-p/848261#M42019</link>
      <description>&lt;P&gt;&lt;SPAN&gt;To include missing values in the calculation variables in proc tabulate, you can use the &lt;/SPAN&gt;&lt;CODE&gt;MISSING&lt;/CODE&gt;&lt;SPAN&gt; option in the &lt;/SPAN&gt;&lt;CODE&gt;VAR&lt;/CODE&gt;&lt;SPAN&gt; statement. This will tell proc tabulate to include missing values in the calculations for the specified variables. Here is an example of how to do this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc tabulate data=have out=want;
  var ED ICU Regular Physician Lab Radiology Pharma Thera / missing;
  class PT_class;
  table (ED ICU Regular Physician Lab Radiology Pharma Thera), (PT_class all)*((N mean median p25 p75 sum));
  format PT_class PT_class.; 	
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Note that using the &lt;CODE&gt;MISSING&lt;/CODE&gt; option will include missing values in the calculations for all of the specified variables, not just for individual variables.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 02:10:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-include-the-missing-value/m-p/848261#M42019</guid>
      <dc:creator>webart999ARM</dc:creator>
      <dc:date>2022-12-07T02:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to include the missing value?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-include-the-missing-value/m-p/848332#M42020</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/67134"&gt;@ybz12003&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have missing values in all the variables to be calculated.&amp;nbsp; To get the average of them, I would like to include the count of the missing values in the denominator.&amp;nbsp; Maybe I should use another step to do this separately cause the code is used to count all the non-missing values.&amp;nbsp; Right?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Do you mean you want to treat missing values as 0?&amp;nbsp; So this will lower all your statistics?&amp;nbsp; If that's what you want, I would probably use a data step to replace missing values with 0.&amp;nbsp; But it would be an unusual approach to treat missing values as 0.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 13:14:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-include-the-missing-value/m-p/848332#M42020</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2022-12-07T13:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to include the missing value?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-include-the-missing-value/m-p/848380#M42021</link>
      <description>Yes, I plan to treat the missing as 0.</description>
      <pubDate>Wed, 07 Dec 2022 17:21:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-include-the-missing-value/m-p/848380#M42021</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2022-12-07T17:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to include the missing value?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-include-the-missing-value/m-p/848416#M42024</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/268199"&gt;@webart999ARM&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/67134"&gt;@ybz12003&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't see a /missing option for the VAR statement in the documentation.&amp;nbsp; And when I run in 9.4, I get an error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;1
2    data class ;
3      set sashelp.class ;
4      if _n_=1 then age=. ;
5    run ;

NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: The data set WORK.CLASS has 19 observations and 5 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      user cpu time       0.00 seconds
      system cpu time     0.00 seconds
      memory              559.21k
      OS Memory           16624.00k
      Timestamp           12/07/2022 03:35:00 PM
      Step Count                        13  Switch Count  0


6
7    proc tabulate data=class ;
8      class sex ;
9      var age /missing;
                -------
                22
                202
ERROR 22-322: Syntax error, expecting one of the following: ;, STYLE, WEIGHT, WGT.
ERROR 202-322: The option or parameter is not recognized and will be ignored.
10     tables sex,age*(n nmiss mean median) ;
11   run ;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Is that accepted answer working? In what version of SAS does it work?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 20:38:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-include-the-missing-value/m-p/848416#M42024</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2022-12-07T20:38:18Z</dc:date>
    </item>
  </channel>
</rss>

