<?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: Confidence Intervals for Coefficient of Variation of logged data in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Confidence-Intervals-for-Coefficient-of-Variation-of-logged-data/m-p/564892#M27864</link>
    <description>&lt;P&gt;That's an interesting question, and I don't know a formula for the answer. The simplest answer is to &lt;A href="https://blogs.sas.com/content/iml/2018/12/12/essential-guide-bootstrapping-sas.html" target="_self"&gt;run a bootstrap analysis&lt;/A&gt; of the geometric CV statistic.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It appears that your formulas come from&amp;nbsp;Sawant and&amp;nbsp;Mohan (2011)&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.lexjansen.com/pharmasug/2011/PO/PharmaSUG-2011-PO08.pdf" target="_blank"&gt;https://www.lexjansen.com/pharmasug/2011/PO/PharmaSUG-2011-PO08.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I encourage you to read the articles by&lt;/P&gt;
&lt;P&gt;Roenfeldt (2018) &lt;A href="https://www.lexjansen.com/wuss/2018/56_Final_Paper_PDF.pdf" target="_blank"&gt;https://www.lexjansen.com/wuss/2018/56_Final_Paper_PDF.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;and the blog post by&amp;nbsp;Lee Humphries (2010)&lt;BR /&gt;&lt;A href="https://www.thinkingapplied.com/cov_folder/geo_cov.htm" target="_blank"&gt;https://www.thinkingapplied.com/cov_folder/geo_cov.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;which discuss how to compute the geometric CV.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The computations by Roesfeldt and Humphries make sense to me, but it is possible that Sawant and Mohan's computation is on a different scale. It is always confusing (to me) to figure out which results are on the LOG scale and which are in the original scale.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Jun 2019 13:44:26 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2019-06-10T13:44:26Z</dc:date>
    <item>
      <title>Confidence Intervals for Coefficient of Variation of logged data</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Confidence-Intervals-for-Coefficient-of-Variation-of-logged-data/m-p/564848#M27861</link>
      <description>&lt;P&gt;Below is code to get CV for log-transformed data (i.e. the geometric CV). But how do I&amp;nbsp;calculate the 95% CI?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;data DSN;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;&amp;nbsp; set DSN_IN;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;&amp;nbsp; if X ne . then lnX=log(X);&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;run;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;proc means data=DSN noprint;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;&amp;nbsp; var lnX;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;&amp;nbsp; output out=stats n=n mean=mean stddev=sd;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;run;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;data stats;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;&amp;nbsp; set stats;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;&amp;nbsp; geosd=exp(sd);&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;&amp;nbsp; ln2GSD=(log(geosd))**2;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;&amp;nbsp; geoCV=100*(sqrt(exp(ln2GSD)-1));&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;run;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2019 10:43:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Confidence-Intervals-for-Coefficient-of-Variation-of-logged-data/m-p/564848#M27861</guid>
      <dc:creator>RC2</dc:creator>
      <dc:date>2019-06-10T10:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: Confidence Intervals for Coefficient of Variation of logged data</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Confidence-Intervals-for-Coefficient-of-Variation-of-logged-data/m-p/564892#M27864</link>
      <description>&lt;P&gt;That's an interesting question, and I don't know a formula for the answer. The simplest answer is to &lt;A href="https://blogs.sas.com/content/iml/2018/12/12/essential-guide-bootstrapping-sas.html" target="_self"&gt;run a bootstrap analysis&lt;/A&gt; of the geometric CV statistic.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It appears that your formulas come from&amp;nbsp;Sawant and&amp;nbsp;Mohan (2011)&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.lexjansen.com/pharmasug/2011/PO/PharmaSUG-2011-PO08.pdf" target="_blank"&gt;https://www.lexjansen.com/pharmasug/2011/PO/PharmaSUG-2011-PO08.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I encourage you to read the articles by&lt;/P&gt;
&lt;P&gt;Roenfeldt (2018) &lt;A href="https://www.lexjansen.com/wuss/2018/56_Final_Paper_PDF.pdf" target="_blank"&gt;https://www.lexjansen.com/wuss/2018/56_Final_Paper_PDF.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;and the blog post by&amp;nbsp;Lee Humphries (2010)&lt;BR /&gt;&lt;A href="https://www.thinkingapplied.com/cov_folder/geo_cov.htm" target="_blank"&gt;https://www.thinkingapplied.com/cov_folder/geo_cov.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;which discuss how to compute the geometric CV.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The computations by Roesfeldt and Humphries make sense to me, but it is possible that Sawant and Mohan's computation is on a different scale. It is always confusing (to me) to figure out which results are on the LOG scale and which are in the original scale.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2019 13:44:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Confidence-Intervals-for-Coefficient-of-Variation-of-logged-data/m-p/564892#M27864</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-06-10T13:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: Confidence Intervals for Coefficient of Variation of logged data</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Confidence-Intervals-for-Coefficient-of-Variation-of-logged-data/m-p/564951#M27867</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/270805"&gt;@RC2&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My first idea was to transform a CI for the standard deviation of lnX:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Create test data for demonstration */

data have;
call streaminit(27182818);
do j=1 to 1000;
  x=rand('lognormal',5,2);
  output;
end;
run;

/* Compute geometric CV and 95% CI "manually" */

data trans;
set have;
if x&amp;gt;0 then lnx=log(x);
run;

proc summary data=trans;
var lnx;
output out=stat std=sd;
run;

data stat;
set stat;
geoCV=100*(sqrt(exp(sd**2)-1));
run;

ods output BasicIntervals=ci(where=(parameter=:'Std'));
proc univariate data=trans cibasic;
var lnx;
run;

data want0(keep=geoCV lcl ucl);
set ci;
set stat;
lcl=100*sqrt(exp(lowercl**2)-1);
ucl=100*sqrt(exp(uppercl**2)-1);
run;

proc print data=want0;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But then I noticed that &lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_ttest_details07.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_blank" rel="noopener"&gt;PROC TTEST&lt;/A&gt; (scroll down to the bottom of that page) can compute both the geometric CV and the same CI as above directly from the untransformed data (except for the factor of 100[%], which I introduce below by means of the PERCENT&lt;EM&gt;w&lt;/EM&gt;.&lt;EM&gt;d&lt;/EM&gt; format).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Let PROC TTEST compute geometric CV and 95% CI */

ods graphics off;
ods select none;
ods output conflimits=want;
proc ttest data=have dist=lognormal;
var x;
run;
ods graphics on;
ods select all;

proc print data=want;
format _numeric_ percent10.3;
var cv lowerclcv upperclcv umpu:;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In addition, you get an alternative (UMPU) CI.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2019 16:31:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Confidence-Intervals-for-Coefficient-of-Variation-of-logged-data/m-p/564951#M27867</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2019-06-10T16:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: Confidence Intervals for Coefficient of Variation of logged data</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Confidence-Intervals-for-Coefficient-of-Variation-of-logged-data/m-p/565096#M27870</link>
      <description>&lt;P&gt;Dear RICK_SAS,&lt;/P&gt;&lt;P&gt;Many thanks for the article links. Indeed, they were interesting reads. Bootstrapping is a good option but I see a post suggesting TTEST, which I didn't know about.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rick&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2019 02:37:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Confidence-Intervals-for-Coefficient-of-Variation-of-logged-data/m-p/565096#M27870</guid>
      <dc:creator>RC2</dc:creator>
      <dc:date>2019-06-11T02:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Confidence Intervals for Coefficient of Variation of logged data</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Confidence-Intervals-for-Coefficient-of-Variation-of-logged-data/m-p/565097#M27871</link>
      <description>&lt;P&gt;Dear FreelanceReinhard,&lt;/P&gt;&lt;P&gt;It never occurred to me that&amp;nbsp;TTEST would do this. Thank you for the help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rick&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2019 02:39:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Confidence-Intervals-for-Coefficient-of-Variation-of-logged-data/m-p/565097#M27871</guid>
      <dc:creator>RC2</dc:creator>
      <dc:date>2019-06-11T02:39:37Z</dc:date>
    </item>
  </channel>
</rss>

