<?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 Fast/Easy way to display Geometric Mean in a boxplot? in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Fast-Easy-way-to-display-Geometric-Mean-in-a-boxplot/m-p/449702#M20749</link>
    <description>&lt;P&gt;I have inherited a general boxplot program (V9.4) that displays the mean. &amp;nbsp;I need to update to reporting the geometric mean.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The current program is using a boxplot statement in PROC TEMPLATE, which is then called in PROC SGRENDER:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc template;&lt;BR /&gt;define statgraph XXX;&lt;BR /&gt;begingraph ;&lt;BR /&gt;                                                                                                                          &lt;BR /&gt;...blah blah axis options and titles and whatnot...&lt;BR /&gt; &lt;BR /&gt;boxplot y=yvar x=xvar / datalabelattrs=(color=black size=4) boxwidth=0.25 display=(caps fill median mean outliers);&lt;BR /&gt;&lt;BR /&gt;endlayout;&lt;BR /&gt;&lt;BR /&gt;endgraph;&lt;BR /&gt;end;&lt;BR /&gt;run;      &lt;BR /&gt;                                                                                                &lt;BR /&gt;proc sgrender data=mydata template = XXX;                                                                                                                             &lt;BR /&gt;run;                                                                                                                                    &lt;BR /&gt;quit; &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not finding any options to display geometric means. &amp;nbsp;I'm poking around at using PROC SGPLOT instead with VBOX, but I'm not finding any options there either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unless there is some awesomely cool proc or option I'm missing, I'm thinking my best bet may be to suppress printing the mean, calculate geo-mean, and overlay it separately. &amp;nbsp;Any suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many many thanks,&lt;/P&gt;&lt;P&gt;VCM&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Mar 2018 15:38:53 GMT</pubDate>
    <dc:creator>VCM</dc:creator>
    <dc:date>2018-03-29T15:38:53Z</dc:date>
    <item>
      <title>Fast/Easy way to display Geometric Mean in a boxplot?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Fast-Easy-way-to-display-Geometric-Mean-in-a-boxplot/m-p/449702#M20749</link>
      <description>&lt;P&gt;I have inherited a general boxplot program (V9.4) that displays the mean. &amp;nbsp;I need to update to reporting the geometric mean.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The current program is using a boxplot statement in PROC TEMPLATE, which is then called in PROC SGRENDER:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc template;&lt;BR /&gt;define statgraph XXX;&lt;BR /&gt;begingraph ;&lt;BR /&gt;                                                                                                                          &lt;BR /&gt;...blah blah axis options and titles and whatnot...&lt;BR /&gt; &lt;BR /&gt;boxplot y=yvar x=xvar / datalabelattrs=(color=black size=4) boxwidth=0.25 display=(caps fill median mean outliers);&lt;BR /&gt;&lt;BR /&gt;endlayout;&lt;BR /&gt;&lt;BR /&gt;endgraph;&lt;BR /&gt;end;&lt;BR /&gt;run;      &lt;BR /&gt;                                                                                                &lt;BR /&gt;proc sgrender data=mydata template = XXX;                                                                                                                             &lt;BR /&gt;run;                                                                                                                                    &lt;BR /&gt;quit; &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not finding any options to display geometric means. &amp;nbsp;I'm poking around at using PROC SGPLOT instead with VBOX, but I'm not finding any options there either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unless there is some awesomely cool proc or option I'm missing, I'm thinking my best bet may be to suppress printing the mean, calculate geo-mean, and overlay it separately. &amp;nbsp;Any suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many many thanks,&lt;/P&gt;&lt;P&gt;VCM&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 15:38:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Fast-Easy-way-to-display-Geometric-Mean-in-a-boxplot/m-p/449702#M20749</guid>
      <dc:creator>VCM</dc:creator>
      <dc:date>2018-03-29T15:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: Fast/Easy way to display Geometric Mean in a boxplot?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Fast-Easy-way-to-display-Geometric-Mean-in-a-boxplot/m-p/449710#M20750</link>
      <description>&lt;P&gt;Isn't there a transformation you can do that will give you the geo mean? Take the log and then the average is your geo mean?&lt;BR /&gt;Could you add the transformed data to your graph, but make it invisible and have that mean calculated as your shown statistic?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 15:54:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Fast-Easy-way-to-display-Geometric-Mean-in-a-boxplot/m-p/449710#M20750</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-03-29T15:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: Fast/Easy way to display Geometric Mean in a boxplot?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Fast-Easy-way-to-display-Geometric-Mean-in-a-boxplot/m-p/449713#M20751</link>
      <description>I think the geo mean is the exp of the mean of the log, so I don't think just creating new variable = log(yvar) and then running it through the sgrender will work. (Someone correct me if I'm wrong?)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;VCM</description>
      <pubDate>Thu, 29 Mar 2018 16:03:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Fast-Easy-way-to-display-Geometric-Mean-in-a-boxplot/m-p/449713#M20751</guid>
      <dc:creator>VCM</dc:creator>
      <dc:date>2018-03-29T16:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: Fast/Easy way to display Geometric Mean in a boxplot?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Fast-Easy-way-to-display-Geometric-Mean-in-a-boxplot/m-p/449715#M20752</link>
      <description>&lt;P&gt;You're probably correct, I didn't look at it much, the other suggestion is create it as a macro variable and include that value in your SGRENDER procedure as a dynamic variable.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 16:08:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Fast-Easy-way-to-display-Geometric-Mean-in-a-boxplot/m-p/449715#M20752</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-03-29T16:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: Fast/Easy way to display Geometric Mean in a boxplot?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Fast-Easy-way-to-display-Geometric-Mean-in-a-boxplot/m-p/449728#M20753</link>
      <description>&lt;P&gt;Fast/easy way? I guess that depends on how you define "fast" and "easy", but I would say NO there isn't a fast/easy way to do this.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could always compute the geometric mean before your run your boxplots, and then annotate them onto the plot. You can do the calculations using the GEOMEAN or GEOMEANZ functions in a data step, or the GEOMEAN option in PROC UNIVARIATE.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 20:25:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Fast-Easy-way-to-display-Geometric-Mean-in-a-boxplot/m-p/449728#M20753</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-03-29T20:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: Fast/Easy way to display Geometric Mean in a boxplot?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Fast-Easy-way-to-display-Geometric-Mean-in-a-boxplot/m-p/450966#M20772</link>
      <description>&lt;P&gt;I was able to get this by suppressing the mean in the box, and adding a scatterplot statement to plot the geometric mean (which had been calculated earlier in the program):&lt;BR /&gt;&lt;BR /&gt;boxplot x=xvar y=yvar /whiskerattrs=(thickness=0) display=(fill median outliers);&lt;BR /&gt;scatterplot x=xvar y=gmean/MARKERATTRS=(SIZE=6pt color=cx0066ff SYMBOL=trianglefilled);&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 08:20:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Fast-Easy-way-to-display-Geometric-Mean-in-a-boxplot/m-p/450966#M20772</guid>
      <dc:creator>VCM</dc:creator>
      <dc:date>2018-04-04T08:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: Fast/Easy way to display Geometric Mean in a boxplot?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Fast-Easy-way-to-display-Geometric-Mean-in-a-boxplot/m-p/451121#M20778</link>
      <description>&lt;P&gt;What about a TEXT statement? Instead of scatterplot?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 14:46:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Fast-Easy-way-to-display-Geometric-Mean-in-a-boxplot/m-p/451121#M20778</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-04T14:46:56Z</dc:date>
    </item>
  </channel>
</rss>

