<?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 FREQ - Output row percentages in SAS Software for Learning Community</title>
    <link>https://communities.sas.com/t5/SAS-Software-for-Learning/PROC-FREQ-Output-row-percentages/m-p/930863#M1891</link>
    <description>&lt;P&gt;Add the OUTPCT option.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;See the list of options in Table 9 in the documentation:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/v_051/statug/statug_freq_syntax08.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/v_051/statug/statug_freq_syntax08.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/36911"&gt;@_maldini_&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Can you designate which statistics to output into a new dataset using PROC FREQ?&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=go_long ;
    tables exam*htn / nocol nopercent out=htn_plot;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The above syntax produces the correct table, which has counts and row percentages for each value of exam:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-06-04 at 1.39.24 PM.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/97012i8F50C1DFC3F19AAF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-06-04 at 1.39.24 PM.png" alt="Screenshot 2024-06-04 at 1.39.24 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;But the output dataset does not contain the row percentages, which is what I want (it looks like it contains total percent).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=htn_plot; where htn=1; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-06-04 at 1.39.53 PM.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/97013i5EA2B181ED51B313/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-06-04 at 1.39.53 PM.png" alt="Screenshot 2024-06-04 at 1.39.53 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Is there a way I can specify which stats&amp;nbsp;(i.e., counts and row percentages) to output using PROC FREQ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Jun 2024 20:48:37 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2024-06-04T20:48:37Z</dc:date>
    <item>
      <title>PROC FREQ - Output row percentages</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/PROC-FREQ-Output-row-percentages/m-p/930862#M1890</link>
      <description>&lt;P&gt;Can you designate which statistics to output into a new dataset using PROC FREQ?&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=go_long ;
    tables exam*htn / nocol nopercent out=htn_plot;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The above syntax produces the correct table, which has counts and row percentages for each value of exam:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-06-04 at 1.39.24 PM.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/97012i8F50C1DFC3F19AAF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-06-04 at 1.39.24 PM.png" alt="Screenshot 2024-06-04 at 1.39.24 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;But the output dataset does not contain the row percentages, which is what I want (it looks like it contains total percent).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=htn_plot; where htn=1; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-06-04 at 1.39.53 PM.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/97013i5EA2B181ED51B313/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-06-04 at 1.39.53 PM.png" alt="Screenshot 2024-06-04 at 1.39.53 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Is there a way I can specify which stats&amp;nbsp;(i.e., counts and row percentages) to output using PROC FREQ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2024 20:45:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/PROC-FREQ-Output-row-percentages/m-p/930862#M1890</guid>
      <dc:creator>_maldini_</dc:creator>
      <dc:date>2024-06-04T20:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FREQ - Output row percentages</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/PROC-FREQ-Output-row-percentages/m-p/930863#M1891</link>
      <description>&lt;P&gt;Add the OUTPCT option.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;See the list of options in Table 9 in the documentation:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/v_051/statug/statug_freq_syntax08.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/v_051/statug/statug_freq_syntax08.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/36911"&gt;@_maldini_&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Can you designate which statistics to output into a new dataset using PROC FREQ?&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=go_long ;
    tables exam*htn / nocol nopercent out=htn_plot;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The above syntax produces the correct table, which has counts and row percentages for each value of exam:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-06-04 at 1.39.24 PM.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/97012i8F50C1DFC3F19AAF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-06-04 at 1.39.24 PM.png" alt="Screenshot 2024-06-04 at 1.39.24 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;But the output dataset does not contain the row percentages, which is what I want (it looks like it contains total percent).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=htn_plot; where htn=1; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-06-04 at 1.39.53 PM.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/97013i5EA2B181ED51B313/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-06-04 at 1.39.53 PM.png" alt="Screenshot 2024-06-04 at 1.39.53 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Is there a way I can specify which stats&amp;nbsp;(i.e., counts and row percentages) to output using PROC FREQ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2024 20:48:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/PROC-FREQ-Output-row-percentages/m-p/930863#M1891</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2024-06-04T20:48:37Z</dc:date>
    </item>
  </channel>
</rss>

