<?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: Geometric Mean and %CV in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Geometric-Mean-and-CV/m-p/404797#M21111</link>
    <description>&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have coded as you recommended:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*...**;
&lt;U&gt;LN_PCORRESN&lt;/U&gt;=log(PCORRESN);
*...**;
proc means data=pretable2 mean std cv min median max; 
   var PCORRESN &lt;U&gt;LN_PCORRESN&lt;/U&gt;;
   class PCSEQ TRT01AN; 
run; 
*...**;
data pretable4;
   set pretable3;
   Geom_mean=exp(&lt;U&gt;LN_PCORRESN_Mean&lt;/U&gt;);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Just one question left:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You provided the following formula of Geometric %CV:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;geo_cv&amp;nbsp;&amp;nbsp; = sqrt{exp[&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;std_lnx&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;**2]-1}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the same time in the in the programming specification I have found the following one:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;CV% geo-mean = sqrt (exp (variance for log transformed data)-1)*100.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;Just one question left:&lt;EM&gt;&lt;STRONG&gt; Is the 'variance for log transformed data' equal to 'std_lnx**2'? Or " **2 " was missed in the specification formula?&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Oct 2017 14:18:08 GMT</pubDate>
    <dc:creator>DmytroYermak</dc:creator>
    <dc:date>2017-10-17T14:18:08Z</dc:date>
    <item>
      <title>Geometric Mean and %CV</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Geometric-Mean-and-CV/m-p/403995#M21060</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Could you please advise what&amp;nbsp;SAS procedure can complete all this analysis?&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="large (1).jpg" style="width: 250px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18995i771D651E999D4FEE/image-size/large?v=v2&amp;amp;px=999" role="button" title="large (1).jpg" alt="large (1).jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Timepoint
  Statistic
--------------------------------------
Pre-Dose
   n
   Arithmetic Mean
   Geometric Mean
   SD
   %CV
   Geometric %CV
   Min
   Median
   Max&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Mar 2018 07:38:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Geometric-Mean-and-CV/m-p/403995#M21060</guid>
      <dc:creator>DmytroYermak</dc:creator>
      <dc:date>2018-03-06T07:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: Geometric Mean and %CV</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Geometric-Mean-and-CV/m-p/404018#M21061</link>
      <description>&lt;P&gt;PROC MEANS or SURVEYMEANS.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For geometric mean, create a log() of the variable and then use that variable with the mean.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can look up the definition to see how this would work.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise, both procedures can calculate all the statistics you've listed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please post it as text in the future, it's hard to read images and there's nothing confidential in your image.&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/58513"&gt;@DmytroYermak&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please advise what&amp;nbsp;SAS procedure can complete all this analysis? Or it should be several ones?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="4.jpg" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/15872i43AD618D86105007/image-size/large?v=v2&amp;amp;px=999" role="button" title="4.jpg" alt="4.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 16:35:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Geometric-Mean-and-CV/m-p/404018#M21061</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-13T16:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Geometric Mean and %CV</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Geometric-Mean-and-CV/m-p/404037#M21062</link>
      <description>&lt;P&gt;Except for the geometric mean and geometric cv, you can get all the others with proc means.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And if you create a LN_X=&amp;nbsp; log(X) = the natural log of X, then submitting both X and LN_X to&amp;nbsp;proc means would generate all the non-geo stats for X, and also the a set of stats for LN_X, including its mean and std.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just exponentiate the mean of LN_X to get geometric mean of X.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As to "geometric %cv", as to &lt;A href="https://en.wikipedia.org/wiki/Coefficient_of_variation" target="_self"&gt;https://en.wikipedia.org/wiki/Coefficient_of_variation&lt;/A&gt;, you can take the std of LN_X (call it &lt;EM&gt;&lt;STRONG&gt;std_lnx&lt;/STRONG&gt;&lt;/EM&gt;), and generate the geometric CV:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; geo_cv&amp;nbsp;&amp;nbsp; = sqrt{exp[&lt;EM&gt;&lt;STRONG&gt;std_lnx&lt;/STRONG&gt;&lt;/EM&gt;**2]-1}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 17:12:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Geometric-Mean-and-CV/m-p/404037#M21062</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2017-10-13T17:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Geometric Mean and %CV</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Geometric-Mean-and-CV/m-p/404204#M21077</link>
      <description>Thank you for the replies! I will publish the code here later on.</description>
      <pubDate>Sat, 14 Oct 2017 10:43:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Geometric-Mean-and-CV/m-p/404204#M21077</guid>
      <dc:creator>DmytroYermak</dc:creator>
      <dc:date>2017-10-14T10:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: Geometric Mean and %CV</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Geometric-Mean-and-CV/m-p/404797#M21111</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have coded as you recommended:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*...**;
&lt;U&gt;LN_PCORRESN&lt;/U&gt;=log(PCORRESN);
*...**;
proc means data=pretable2 mean std cv min median max; 
   var PCORRESN &lt;U&gt;LN_PCORRESN&lt;/U&gt;;
   class PCSEQ TRT01AN; 
run; 
*...**;
data pretable4;
   set pretable3;
   Geom_mean=exp(&lt;U&gt;LN_PCORRESN_Mean&lt;/U&gt;);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Just one question left:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You provided the following formula of Geometric %CV:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;geo_cv&amp;nbsp;&amp;nbsp; = sqrt{exp[&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;std_lnx&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;**2]-1}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the same time in the in the programming specification I have found the following one:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;CV% geo-mean = sqrt (exp (variance for log transformed data)-1)*100.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;Just one question left:&lt;EM&gt;&lt;STRONG&gt; Is the 'variance for log transformed data' equal to 'std_lnx**2'? Or " **2 " was missed in the specification formula?&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 14:18:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Geometric-Mean-and-CV/m-p/404797#M21111</guid>
      <dc:creator>DmytroYermak</dc:creator>
      <dc:date>2017-10-17T14:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: Geometric Mean and %CV</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Geometric-Mean-and-CV/m-p/405201#M21129</link>
      <description>&lt;P&gt;A variance is the square of the standard deviation, so both formulas are correct.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The "100" in the second formula converts from a proportion to a percentage.&amp;nbsp; Personally, I prefer to compute the proportion and then use the PERCENT8.2 format to display the proportion as a percentage.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 13:31:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Geometric-Mean-and-CV/m-p/405201#M21129</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-10-18T13:31:37Z</dc:date>
    </item>
  </channel>
</rss>

