<?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 A calculated percentage from PROC FREQ or other method... in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/A-calculated-percentage-from-PROC-FREQ-or-other-method/m-p/481145#M71581</link>
    <description>&lt;P&gt;I have a frequency table given by PROC FREQ that looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;PROC FREQ DATA = have;
TABLES SurgeryGroup * InsuranceStatus / nopercent;
RUN;&lt;/PRE&gt;&lt;P&gt;It gives me the correct table that looks like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="table.jpg" style="width: 573px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21996i7D0A4752A6502CE9/image-size/large?v=v2&amp;amp;px=999" role="button" title="table.jpg" alt="table.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to make a separate calculation off of this table called the "Reconstruction Rate" - subdivided by insurance status like above - which is basically:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No BCT w/ Recon / (No BCT w/ Recon + No BCT)&lt;/P&gt;&lt;P&gt;Example: 36/(36 + 69)&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;amp;&amp;nbsp; &amp;nbsp; &amp;nbsp; 563/(563 + 595)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It should be coded so that if the frequencies of the table change (possibly due to more data added at a later date), then so does the answer to the calculation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated. Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="branch"&gt;&lt;DIV align="center"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV align="center"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 25 Jul 2018 15:12:33 GMT</pubDate>
    <dc:creator>lady8506</dc:creator>
    <dc:date>2018-07-25T15:12:33Z</dc:date>
    <item>
      <title>A calculated percentage from PROC FREQ or other method...</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/A-calculated-percentage-from-PROC-FREQ-or-other-method/m-p/481145#M71581</link>
      <description>&lt;P&gt;I have a frequency table given by PROC FREQ that looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;PROC FREQ DATA = have;
TABLES SurgeryGroup * InsuranceStatus / nopercent;
RUN;&lt;/PRE&gt;&lt;P&gt;It gives me the correct table that looks like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="table.jpg" style="width: 573px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21996i7D0A4752A6502CE9/image-size/large?v=v2&amp;amp;px=999" role="button" title="table.jpg" alt="table.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to make a separate calculation off of this table called the "Reconstruction Rate" - subdivided by insurance status like above - which is basically:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No BCT w/ Recon / (No BCT w/ Recon + No BCT)&lt;/P&gt;&lt;P&gt;Example: 36/(36 + 69)&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;amp;&amp;nbsp; &amp;nbsp; &amp;nbsp; 563/(563 + 595)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It should be coded so that if the frequencies of the table change (possibly due to more data added at a later date), then so does the answer to the calculation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated. Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="branch"&gt;&lt;DIV align="center"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV align="center"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 25 Jul 2018 15:12:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/A-calculated-percentage-from-PROC-FREQ-or-other-method/m-p/481145#M71581</guid>
      <dc:creator>lady8506</dc:creator>
      <dc:date>2018-07-25T15:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: A calculated frequency from PROC FREQ or other method...</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/A-calculated-percentage-from-PROC-FREQ-or-other-method/m-p/481146#M71582</link>
      <description>&lt;P&gt;Create an output data set, and then do the additional calculations using this output data set from PROC FREQ.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To create an output data set, use&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;TABLES SurgeryGroup * InsuranceStatus / nopercent out=results;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;OR&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I am udnerstanding the additional calculations correctly, you could run another PROC FREQ wihtout the category "Had Breast Conserving Surgery" and then this second PROC FREQ would give you the results directly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2018 14:49:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/A-calculated-percentage-from-PROC-FREQ-or-other-method/m-p/481146#M71582</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-07-25T14:49:00Z</dc:date>
    </item>
  </channel>
</rss>

