<?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 tabulate, adding across variable to the table and maintain the row percentage in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-tabulate-adding-across-variable-to-the-table-and-maintain/m-p/616662#M180553</link>
    <description>&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Change the table column specification from&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;,CANCER_SITE=''*MISS1=''*ROWpctn ALL&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;,CANCER_SITE=' ' * MISS1=' ' * (PCTN&amp;lt;MISS1&amp;gt;*f=6.2 N*f=comma9.0) ALL*F=comma9.0&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;I think PCTN is better than ROWPCTN at honoring your desired denominator for percent calculations.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 11 Jan 2020 04:47:27 GMT</pubDate>
    <dc:creator>mkeintz</dc:creator>
    <dc:date>2020-01-11T04:47:27Z</dc:date>
    <item>
      <title>Proc tabulate, adding across variable to the table and maintain the row percentage</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-tabulate-adding-across-variable-to-the-table-and-maintain/m-p/616654#M180548</link>
      <description>&lt;P&gt;Hi folks:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to show the proportion of patients with missing stage by other covariates, for example, by age group in the image shown below.&lt;/P&gt;
&lt;P&gt;My output is changed from WANTED to WRONG which you can see in the image below that the numbers for Breast cancer are changed before vs after adding the '&lt;CODE class=" language-sas"&gt;CANCER_SITE&lt;/CODE&gt;' category into the proc tabulate to produce the statistics for four different cancer sites.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to add &lt;CODE class=" language-sas"&gt;CANCER_SITE&lt;/CODE&gt; correctly in the proc tabulate code without changing the statistics that I'm showing in the WANTED part?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please see my code snippet and mock data if needed.&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PROC TAB WENT WRONG.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/35271iC8072B6EA459EE06/image-size/large?v=v2&amp;amp;px=999" role="button" title="PROC TAB WENT WRONG.png" alt="PROC TAB WENT WRONG.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC TABULATE DATA=BREAST_TABLE;
class MISS1 AGEGRP SEX RACETH STAGE1 SURGERY MEDICAID type_of_reporting_source
      marital_status_at_dx CANCER_SITE/ASCENDING;
table ALL (AGEGRP SEX RACETH marital_status_at_dx SURGERY STAGE1 MEDICAID
type_of_reporting_source),CANCER_SITE=''*MISS1=''*ROWpctn ALL;
RUN;DATA HAVE;&lt;BR /&gt;INPUT GENDER MISS_STATUS;&lt;BR /&gt;&lt;BR /&gt;/*IF MOCK DATA NEEDED*/&lt;BR /&gt;DATA HAVE;&lt;BR /&gt;INPUT AGEGRP MISS_STATUS CANCER_SITE;&lt;BR /&gt;DATALINES;&lt;BR /&gt;1 1 1&lt;BR /&gt;1 1 1&lt;BR /&gt;1 1 1&lt;BR /&gt;1 0 1&lt;BR /&gt;1 0 1&lt;BR /&gt;1 0 1&lt;BR /&gt;1 0 1&lt;BR /&gt;1 0 1&lt;BR /&gt;0 1 1&lt;BR /&gt;0 1 1&lt;BR /&gt;0 1 1&lt;BR /&gt;0 0 1&lt;BR /&gt;0 0 1&lt;BR /&gt;0 0 1&lt;BR /&gt;0 0 1&lt;BR /&gt;1 1 2&lt;BR /&gt;1 1 2&lt;BR /&gt;1 1 2&lt;BR /&gt;1 1 2&lt;BR /&gt;1 1 2&lt;BR /&gt;1 0 2&lt;BR /&gt;1 0 2&lt;BR /&gt;1 0 2&lt;BR /&gt;0 1 2&lt;BR /&gt;0 1 2&lt;BR /&gt;0 1 2&lt;BR /&gt;0 1 2&lt;BR /&gt;0 1 2&lt;BR /&gt;0 0 2&lt;BR /&gt;0 0 2&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I greatly appreciate your time!&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jan 2020 01:36:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-tabulate-adding-across-variable-to-the-table-and-maintain/m-p/616654#M180548</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2020-01-11T01:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: Proc tabulate, adding across variable to the table and maintain the row percentage</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-tabulate-adding-across-variable-to-the-table-and-maintain/m-p/616662#M180553</link>
      <description>&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Change the table column specification from&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;,CANCER_SITE=''*MISS1=''*ROWpctn ALL&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;,CANCER_SITE=' ' * MISS1=' ' * (PCTN&amp;lt;MISS1&amp;gt;*f=6.2 N*f=comma9.0) ALL*F=comma9.0&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;I think PCTN is better than ROWPCTN at honoring your desired denominator for percent calculations.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jan 2020 04:47:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-tabulate-adding-across-variable-to-the-table-and-maintain/m-p/616662#M180553</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2020-01-11T04:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc tabulate, adding across variable to the table and maintain the row percentage</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-tabulate-adding-across-variable-to-the-table-and-maintain/m-p/616674#M180560</link>
      <description>The suggested change solved the problem. I would not have thought of this modification unless you pointed out. I greatly appreciate your help. Thanks a lot!</description>
      <pubDate>Sat, 11 Jan 2020 12:53:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-tabulate-adding-across-variable-to-the-table-and-maintain/m-p/616674#M180560</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2020-01-11T12:53:47Z</dc:date>
    </item>
  </channel>
</rss>

