<?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 plots in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/PROC-FREQ-plots/m-p/666067#M20152</link>
    <description>&lt;P&gt;There are some examples of how to customize PROC FREQ plots in this paper by Kathryn McLawhorn:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings17/SAS0404-2017.pdf" target="_self"&gt;"Tables and Graphics that will FREQ You Out"&lt;/A&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;See pages 19-20 for how to change titles and axis labels in PROC FREQ plots.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some documentation is here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_odsgraph_sect020.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_self"&gt;Statistical Graphics Using ODS: Modifying Your Graphs&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_templt_toc.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_self"&gt;ODS Graphics Template Modification&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_templt_sect010.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_self"&gt;Examples of ODS Graphics Template Modification&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jun 2020 13:05:51 GMT</pubDate>
    <dc:creator>Watts</dc:creator>
    <dc:date>2020-06-30T13:05:51Z</dc:date>
    <item>
      <title>PROC FREQ plots</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-FREQ-plots/m-p/665871#M20147</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I was wondering if anyone can tell how to manipulate the plots generated by PROC FREQ. The code below generates the&amp;nbsp; plot but I cannot change the title, axis names, etc. of the plot within the PROC FREQ procedure (neither the title nor the label statements make any difference).&lt;/P&gt;&lt;P&gt;Thanks a lot in advance!&lt;/P&gt;&lt;P&gt;Recep Gezer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods graphics on;&lt;BR /&gt;ods html style=statistical;&lt;/P&gt;&lt;P&gt;proc freq data=master_blunt_penetrating order=data;&lt;BR /&gt;tables site*ttl_surgeon*o_expired/ cmh alpha=0.1 relrisk plots=relriskplot(logbase=E);&lt;BR /&gt;weight count;&lt;BR /&gt;label ttl_surgeon= "Trauma Team Leader" o_expired="Mortality";&lt;BR /&gt;title 'Raw data (ignoring hospital) - Blunt and penetrating injuries';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;ods graphics off;&lt;BR /&gt;ods html close;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jun 2020 17:44:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-FREQ-plots/m-p/665871#M20147</guid>
      <dc:creator>Recep</dc:creator>
      <dc:date>2020-06-29T17:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FREQ plots</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-FREQ-plots/m-p/665883#M20148</link>
      <description>&lt;P&gt;Most of the plots associated with the procedures like proc freq are more intended for exploratory analysis.&lt;/P&gt;
&lt;P&gt;If you want enough control for publication type graphics then the general approach is to create output data sets from the procedure and use the data in another graphing procedure with more options and control such as SGPLOT or SGPANEL or even the Graph Template Language.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jun 2020 18:17:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-FREQ-plots/m-p/665883#M20148</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-06-29T18:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FREQ plots</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-FREQ-plots/m-p/666056#M20150</link>
      <description>&lt;P&gt;Here's an example, demonstrating what ballardw is talking about:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data Migraine;&lt;BR /&gt;input Gender $ Treatment $ Response $ Count @@;&lt;BR /&gt;datalines;&lt;BR /&gt;female Active Better 16 female Active Same 11&lt;BR /&gt;female Placebo Better 5 female Placebo Same 20&lt;BR /&gt;male Active Better 12 male Active Same 16&lt;BR /&gt;male Placebo Better 7 male Placebo Same 19&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc freq data=Migraine;&lt;BR /&gt;tables Gender*Treatment*Response / &lt;STRONG&gt;out=freqout&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;relrisk plots(only)=relriskplot(stats) cmh noprint;&lt;BR /&gt;weight Count; &lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;title 'Clinical Trial for Treatment of Migraine Headaches';&lt;BR /&gt;proc sgplot data=&lt;STRONG&gt;freqout&lt;/STRONG&gt;;&lt;BR /&gt;hbarparm category=treatment response=count / group=gender groupdisplay=cluster;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2020 12:33:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-FREQ-plots/m-p/666056#M20150</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2020-06-30T12:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FREQ plots</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-FREQ-plots/m-p/666061#M20151</link>
      <description>&lt;P&gt;Hmm ... well, I guess that sgplot isn't that helpful, since 'count' was in the original dataset. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&amp;nbsp; So, here's a better one, with something that was calculated by proc freq - the 'percent'...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sgplot data=freqout;&lt;BR /&gt;hbarparm category=treatment response=percent / group=gender groupdisplay=cluster;&lt;BR /&gt;run;&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="freq_pct.png" style="width: 640px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/46794i60BE5BCB7049A5B1/image-size/large?v=v2&amp;amp;px=999" role="button" title="freq_pct.png" alt="freq_pct.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2020 12:38:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-FREQ-plots/m-p/666061#M20151</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2020-06-30T12:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FREQ plots</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-FREQ-plots/m-p/666067#M20152</link>
      <description>&lt;P&gt;There are some examples of how to customize PROC FREQ plots in this paper by Kathryn McLawhorn:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings17/SAS0404-2017.pdf" target="_self"&gt;"Tables and Graphics that will FREQ You Out"&lt;/A&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;See pages 19-20 for how to change titles and axis labels in PROC FREQ plots.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some documentation is here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_odsgraph_sect020.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_self"&gt;Statistical Graphics Using ODS: Modifying Your Graphs&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_templt_toc.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_self"&gt;ODS Graphics Template Modification&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_templt_sect010.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_self"&gt;Examples of ODS Graphics Template Modification&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2020 13:05:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-FREQ-plots/m-p/666067#M20152</guid>
      <dc:creator>Watts</dc:creator>
      <dc:date>2020-06-30T13:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FREQ plots</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-FREQ-plots/m-p/666228#M20153</link>
      <description>&lt;P&gt;Thanks a lot for your response! The problem is taking the relative risks, especially calculated at the log base out of the PROC FREQ. For instance the "out=test" option in the TABLES statement below simply produces the counts for each combination of&amp;nbsp;site*ttl_surgeon*o_expired in the TABLES statement. Presumably I can calculate the relative risks by those counts then convert them to the log base but the PROC FREQ code I use also calculates the pooled common relative risk with the CMH option (again I can calculate manually but then what's the point of using PROC FREQ?). For that reason I was hoping to be able to manipulate the relative risks plot within the PROC FREQ. I read a paper, also recommended by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/270201"&gt;@Watts&lt;/a&gt;&amp;nbsp;using PROC TEMPLATE to manipulate the plots but it's slightly more complicated than I hoped for! It may be my only option though:)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc freq data=master_Penetrating order=data;&lt;BR /&gt;tables site*ttl_surgeon*o_expired/cmh alpha=0.1 relrisk plots=relriskplot(logbase=E) &lt;FONT color="#FF0000"&gt;out=test&lt;/FONT&gt;;&lt;BR /&gt;weight count;&lt;BR /&gt;title 'Raw data (ignoring hospital) - Penetrating injuries';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also found this tip sheet for GTL (graph template language) which can be helpful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks all for your comments!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Recep&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13585"&gt;@GraphGuy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2020 23:23:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-FREQ-plots/m-p/666228#M20153</guid>
      <dc:creator>Recep</dc:creator>
      <dc:date>2020-06-30T23:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FREQ plots</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-FREQ-plots/m-p/666248#M20154</link>
      <description>&lt;P&gt;You can get the stats that PROC FREQ displays in the relative risk plot by using an ODS OUTPUT statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods output relriskplot=out;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This output data set includes the stratum relative risks, the common relative risk, and the confidence limits. (When you specify the LOGBASE= plot-option, the values in the output data set are the scaled values.)&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2020 01:46:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-FREQ-plots/m-p/666248#M20154</guid>
      <dc:creator>Watts</dc:creator>
      <dc:date>2020-07-01T01:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FREQ plots</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-FREQ-plots/m-p/669695#M20223</link>
      <description>&lt;P&gt;Thank you very much for your response and I'm very sorry that I responded so late (I was away for a while)! This resolves my issue and gives a lot of flexibility within the PROC SGPLOT.&lt;/P&gt;&lt;P&gt;Regards...&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 20:08:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-FREQ-plots/m-p/669695#M20223</guid>
      <dc:creator>Recep</dc:creator>
      <dc:date>2020-07-15T20:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FREQ plots</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-FREQ-plots/m-p/669707#M20226</link>
      <description>&lt;P&gt;You're welcome. Glad this helps.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 20:23:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-FREQ-plots/m-p/669707#M20226</guid>
      <dc:creator>Watts</dc:creator>
      <dc:date>2020-07-15T20:23:18Z</dc:date>
    </item>
  </channel>
</rss>

