<?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: Proc Tubulate Missing option? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Tubulate-Missing-option/m-p/872334#M344638</link>
    <description>&lt;P&gt;The ALL keyword on the table statement determines getting the statistics for all levels of a class variable combined.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SUM is reserved for VAR variables. To get a total N please see this:&lt;/P&gt;
&lt;PRE&gt;proc tabulate data=sashelp.class;
   class sex age;
   table sex*(n pctn)  ,
         age 
   ;
   table (sex all)*(n pctn)  ,
         age 
   ; 
   table sex*(n pctn)  ,
         age all
   ;
   table (sex all)*(n pctn)  ,
         age all
   ;
run;&lt;/PRE&gt;
&lt;P&gt;You weren't very clear as to which particular "sum" you might want so I include example without any "all" and then examples of each dimension.&lt;/P&gt;</description>
    <pubDate>Wed, 26 Apr 2023 18:11:48 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2023-04-26T18:11:48Z</dc:date>
    <item>
      <title>Proc Tubulate Missing option?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Tubulate-Missing-option/m-p/872327#M344634</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I would like to use the Missing option in the different classes below.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want Age/Sex/Race/Insurance/Underly (Missing value inclusion)&amp;nbsp; and Oxy/ICU/Incub/Ecmo/Died(Missing value exclusion). In addition, is there a way to get the SUM of each class in the Tabulate statement too?&amp;nbsp; Please guild me a way to do it.&amp;nbsp; Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc tabulate data=ARI_UC_Elg_IDs;
   class Age Sex race Insurance oxy ICU Intub Ecmo Died Underly;
   tables (Age Sex race Insurance oxy ICU Intub Ecmo Died)*(n colpctn*f=4.2), Underly;
   where Age_group in (1,2,3);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Apr 2023 17:23:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Tubulate-Missing-option/m-p/872327#M344634</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2023-04-26T17:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tubulate Missing option?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Tubulate-Missing-option/m-p/872329#M344635</link>
      <description>&lt;P&gt;You can have multiple CLASS statements, so to control MISSING option you can do:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc tabulate data=ARI_UC_Elg_IDs;
   class Age Sex race Insurance Underly / missing ;
   class oxy ICU Intub Ecmo Died ;
   tables (Age Sex race Insurance oxy ICU Intub Ecmo Died)*(n colpctn*f=4.2), Underly;
   where Age_group in (1,2,3);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;There are examples in the docs about getting a sum.&amp;nbsp; You need to use a VAR statement to add an analytical variable.&amp;nbsp; See e.g. :&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/p13k5zc709o4t3n1k9u2s7dsnzv9.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/p13k5zc709o4t3n1k9u2s7dsnzv9.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 17:44:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Tubulate-Missing-option/m-p/872329#M344635</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-04-26T17:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tubulate Missing option?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Tubulate-Missing-option/m-p/872334#M344638</link>
      <description>&lt;P&gt;The ALL keyword on the table statement determines getting the statistics for all levels of a class variable combined.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SUM is reserved for VAR variables. To get a total N please see this:&lt;/P&gt;
&lt;PRE&gt;proc tabulate data=sashelp.class;
   class sex age;
   table sex*(n pctn)  ,
         age 
   ;
   table (sex all)*(n pctn)  ,
         age 
   ; 
   table sex*(n pctn)  ,
         age all
   ;
   table (sex all)*(n pctn)  ,
         age all
   ;
run;&lt;/PRE&gt;
&lt;P&gt;You weren't very clear as to which particular "sum" you might want so I include example without any "all" and then examples of each dimension.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 18:11:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Tubulate-Missing-option/m-p/872334#M344638</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-04-26T18:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tubulate Missing option?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Tubulate-Missing-option/m-p/872339#M344639</link>
      <description>&lt;P&gt;Also note, if an observation is removed because of a missing value, it is totally removed.&amp;nbsp; It will be removed for the calculations based on other variables, even when those other variables do not have missing values.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 18:35:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Tubulate-Missing-option/m-p/872339#M344639</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2023-04-26T18:35:28Z</dc:date>
    </item>
  </channel>
</rss>

