<?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: Calculating GMR(Geometric Mean ratio)  at two different visits in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-GMR-Geometric-Mean-ratio-at-two-different-visits/m-p/807890#M39736</link>
    <description>HI ,&lt;BR /&gt;&lt;BR /&gt;1.  Sorry i forgot to add treatment variable in the dataset. I added now its in the below dataset and i updated my code as per your comments .&lt;BR /&gt;2. I  forgot to update tgroup macro to required variable now its updated in the below code.&lt;BR /&gt;3. Yes you are right i should use _type_=3  in proc means updated in the below code.&lt;BR /&gt;4. what i meant is previously i used proc ttest in separate code but it didnt worked so i changed the code to apply PROC GLM&lt;BR /&gt;5. We need to calculate 95% CI using clopper pearson method for particular geometric ratio&lt;BR /&gt;6. what i meant is i need to keep the value of geometric mean ratio between day1 / week 4. so i need to calculate GMR across two visists for each parameter. so how i have to calculate to get the value of GMR? Please take the example of 101 subject at day1 the avla value is 1.3 and week 4 value is 2.2  so what will be the GMR value between these two aval values? could you please  let me know your inputs with a code&lt;BR /&gt;&lt;BR /&gt;data have;&lt;BR /&gt;input subject $ paramcd $ avisit $ aval; trt01pn&lt;BR /&gt;cards;&lt;BR /&gt;101 aaa day1   1.3      1&lt;BR /&gt;101 aaa week4  2.2    1&lt;BR /&gt;102 aaa day1    1.1     2&lt;BR /&gt;102 aaa week4  3.3    2&lt;BR /&gt;103 aaa day1    2.8     1&lt;BR /&gt;103 aaa week4  4.7    1&lt;BR /&gt;104 aaa day1    3.8     2   &lt;BR /&gt;104 aaa week4  4.8    2&lt;BR /&gt;105 aaa day1     2.8   3&lt;BR /&gt;105 aaa week4  5.7   3&lt;BR /&gt;106 aaa day1    3.7    3&lt;BR /&gt;106 aaa week4  4.8   3&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;proc sort data=have ;&lt;BR /&gt;by avisit trt01pn ;&lt;BR /&gt;run ;&lt;BR /&gt;proc means data=have;&lt;BR /&gt;class avisit trt01pn;&lt;BR /&gt;var aval; (GMR value ?)&lt;BR /&gt;output out=mean n=n nmiss=nmiss mean=mean lclm=lclm uclm=uclm;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data gma;&lt;BR /&gt;set mean;&lt;BR /&gt;keep avisit n1 gmc1 lcl1 ucl1;&lt;BR /&gt;where _type_=3 and trt01pn =1;&lt;BR /&gt;n1=n;&lt;BR /&gt;gmc1=10**mean;&lt;BR /&gt;lcl1=10**lclm;&lt;BR /&gt;ucl1=10**uclm;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data gmb;&lt;BR /&gt;set mean;&lt;BR /&gt;keep avisit n2 gmc2 lcl2 ucl2;&lt;BR /&gt;where _type_=3 and trt01pn=2;&lt;BR /&gt;n2=n;&lt;BR /&gt;gmc2 =10**mean;&lt;BR /&gt;lcl2=10**lclm;&lt;BR /&gt;ucl2=10**uclm;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc glm data=have PLOTS(MAXPOINTS= 10000);&lt;BR /&gt;by avisit ;&lt;BR /&gt;class trt01pn;&lt;BR /&gt;model aval = trt01pn ;&lt;BR /&gt;means trt01pn / t cldiff clm;&lt;BR /&gt;ods output cldiffs=dmean ModelAnova=anova;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data rgm ;&lt;BR /&gt;set dmean;&lt;BR /&gt;where comparison="1 - 2";&lt;BR /&gt;keep avisit rgmc rlcl rucl;&lt;BR /&gt;rgmc=10**difference;&lt;BR /&gt;rlcl=10**lowercl;&lt;BR /&gt;rucl=10**uppercl;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc sort data=gma;&lt;BR /&gt;by avisit ;&lt;BR /&gt;proc sort data=gmb;&lt;BR /&gt;by avisit ;&lt;BR /&gt;proc sort data=rgm;&lt;BR /&gt;by avisit ;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data final;&lt;BR /&gt;merge gma gmb rgm ;&lt;BR /&gt;by avisit ;&lt;BR /&gt;run;&lt;BR /&gt;</description>
    <pubDate>Thu, 14 Apr 2022 18:19:30 GMT</pubDate>
    <dc:creator>mounikag</dc:creator>
    <dc:date>2022-04-14T18:19:30Z</dc:date>
    <item>
      <title>Calculating GMR(Geometric Mean ratio)  at two different visits</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-GMR-Geometric-Mean-ratio-at-two-different-visits/m-p/807711#M39724</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a parameter with lab test values(aval) at two different visits(day1, week4). So i need calculate a&amp;nbsp;Geometric Mean Ratio for&amp;nbsp; (Week 4 Antibody Level / Day 1 Antibody Level). for a parameter by vaccine group at week 4&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is the example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;subject&amp;nbsp; &amp;nbsp; &amp;nbsp; paramcd&amp;nbsp; &amp;nbsp; &amp;nbsp; avisit&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;aval&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;GMR&lt;/P&gt;
&lt;P&gt;101&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aaa&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;day1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ?&lt;/P&gt;
&lt;P&gt;101&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aaa&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;week4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2.2&lt;/P&gt;
&lt;P&gt;102&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aaa&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;day1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1.1&lt;/P&gt;
&lt;P&gt;102&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aaa&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;week4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3.3&lt;/P&gt;
&lt;P&gt;103&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aaa&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;day1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2.8&lt;/P&gt;
&lt;P&gt;103&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aaa&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;week4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4.7&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to calculate GMR varaible and also&amp;nbsp; a 95%cI&lt;/P&gt;
&lt;P&gt;Please provide your insights with an example . so it would be helpful to me .. Thanks in Advance&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2022 05:41:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculating-GMR-Geometric-Mean-ratio-at-two-different-visits/m-p/807711#M39724</guid>
      <dc:creator>mounikag</dc:creator>
      <dc:date>2022-04-14T05:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating GMR(Geometric Mean ratio)  at two different visits</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-GMR-Geometric-Mean-ratio-at-two-different-visits/m-p/807752#M39725</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/339070"&gt;@mounikag&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Following&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/statug/15.2/statug_ttest_examples05.htm" target="_blank" rel="noopener"&gt;Example 127.5 Equivalence Testing with Lognormal Data&lt;/A&gt;&amp;nbsp;from the PROC TTEST documentation I suggest this -- assuming that your dataset is already sorted by PARAMCD SUBJECT:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Create sample data */

data have;
input subject $ paramcd $ avisit $ aval;
cards;
101 aaa day1 1.3
101 aaa week4 2.2
102 aaa day1 1.1
102 aaa week4 3.3
103 aaa day1 2.8
103 aaa week4 4.7
;

/* Get Day 1 and Week 4 values into separate variables */

proc transpose data=have out=trans(drop=_name_);
by paramcd subject;
var aval;
id avisit;
run;

/* Compute the GMR Week 4 / Day 1 for AVAL (for each PARAMCD) */

ods select none;
ods output conflimits=want(keep=paramcd ratio--UpperCLGeomMean
                           rename=(GeomMean=GMR LowerCLGeomMean=LowerCL_GMR UpperCLGeomMean=UpperCL_GMR));
proc ttest data=trans dist=lognormal;
by paramcd;
paired week4*day1;
run;
ods select all;

proc print data=want;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;                                              LowerCL_    UpperCL_
Obs    paramcd       Ratio             GMR      GMR         GMR

 1       aaa      week4 / day1      2.0426      0.8933      4.6704&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Apr 2022 09:22:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculating-GMR-Geometric-Mean-ratio-at-two-different-visits/m-p/807752#M39725</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2022-04-14T09:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating GMR(Geometric Mean ratio)  at two different visits</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-GMR-Geometric-Mean-ratio-at-two-different-visits/m-p/807846#M39731</link>
      <description>&lt;P&gt;Hi reinhard,&lt;BR /&gt;&lt;BR /&gt;Thanks for quick reply.. *Below is the sample code i am using to generate the output to pass the GMR variable value into the below aval value. &lt;BR /&gt;I am using proc means procedure dataset to generate 95%CI. Could you please use below code and i need to pass the GMR value of week4/day1&lt;BR /&gt;instead of aval value. I will provide the sample output how i need. As you suggested, I am using the proc ttest but i am not getting the answer.&lt;BR /&gt;Basically i need to pass GMR value between the visits instead of aval value &lt;BR /&gt;&lt;BR /&gt;* Create sample data */;&lt;BR /&gt;&lt;BR /&gt;data have;&lt;BR /&gt;input subject $ paramcd $ avisit $ aval;&lt;BR /&gt;cards;&lt;BR /&gt;101 aaa day1 1.3&lt;BR /&gt;101 aaa week4 2.2&lt;BR /&gt;102 aaa day1 1.1&lt;BR /&gt;102 aaa week4 3.3&lt;BR /&gt;103 aaa day1 2.8&lt;BR /&gt;103 aaa week4 4.7&lt;BR /&gt;104 aaa day1 3.8 2&lt;BR /&gt;104 aaa week4 4.8 2&lt;BR /&gt;105 aaa day1 2.8 3&lt;BR /&gt;105 aaa week4 5.7 3&lt;BR /&gt;106 aaa day1 3.7 3&lt;BR /&gt;106 aaa week4 4.8 3&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;proc sort data=have ;&lt;BR /&gt;by avisit trt01pn ;&lt;BR /&gt;run ;&lt;BR /&gt;proc means data=have;&lt;BR /&gt;class avisit trt01pn;&lt;BR /&gt;var aval;&lt;BR /&gt;output out=mean n=n nmiss=nmiss mean=mean lclm=lclm uclm=uclm;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data gma; &lt;BR /&gt;set mean;&lt;BR /&gt;keep avisit n1 gmc1 lcl1 ucl1;&lt;BR /&gt;where _type_=7 and &amp;amp;tgroup.=1.;&lt;BR /&gt;n1=n;&lt;BR /&gt;gmc1=10**mean;&lt;BR /&gt;lcl1=10**lclm;&lt;BR /&gt;ucl1=10**uclm;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data gmb; &lt;BR /&gt;set mean;&lt;BR /&gt;keep avisit n2 gmc2 lcl2 ucl2;&lt;BR /&gt;where _type_=7 and &amp;amp;tgroup.=2.;&lt;BR /&gt;n2=n;&lt;BR /&gt;gmc2 =10**mean;&lt;BR /&gt;lcl2=10**lclm;&lt;BR /&gt;ucl2=10**uclm;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc glm data=have PLOTS(MAXPOINTS= 10000);&lt;BR /&gt;by avisit ;&lt;BR /&gt;class trt01pn;&lt;BR /&gt;model aval = trt01pn ;&lt;BR /&gt;means trt01pn / t cldiff clm;&lt;BR /&gt;ods output cldiffs=dmean ModelAnova=anova;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data rgm ;&lt;BR /&gt;set dmean;&lt;BR /&gt;where comparison="1 - 2";&lt;BR /&gt;keep avisit rgmc rlcl rucl;&lt;BR /&gt;rgmc=10**difference;&lt;BR /&gt;rlcl=10**lowercl;&lt;BR /&gt;rucl=10**uppercl;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc sort data=gma;&lt;BR /&gt;by avisit ; &lt;BR /&gt;proc sort data=gmb;&lt;BR /&gt;by avisit ; &lt;BR /&gt;proc sort data=rgm;&lt;BR /&gt;by avisit ; &lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data final; &lt;BR /&gt;merge gma gmb rgm ; &lt;BR /&gt;by avisit ; &lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&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-center" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70400iC980ADB04BA6C88A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&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>Thu, 14 Apr 2022 16:14:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculating-GMR-Geometric-Mean-ratio-at-two-different-visits/m-p/807846#M39731</guid>
      <dc:creator>mounikag</dc:creator>
      <dc:date>2022-04-14T16:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating GMR(Geometric Mean ratio)  at two different visits</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-GMR-Geometric-Mean-ratio-at-two-different-visits/m-p/807888#M39735</link>
      <description>&lt;P&gt;Thanks for providing code and a sample output. I'm not sure I understand what you're trying to do, partly because of inconsistencies in your code:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Dataset HAVE does not contain a variable TRT01PN (but a variable PARAMCD), so neither the first PROC SORT step nor the PROC MEANS step will work.&lt;/LI&gt;
&lt;LI&gt;The WHERE conditions in the DATA steps following the PROC MEANS step seem to use a treatment group variable, but the definition of macro variable TGROUP is not shown.&lt;/LI&gt;
&lt;LI&gt;The WHERE condition &lt;FONT face="courier new,courier"&gt;_type_=7&lt;/FONT&gt; will never be met as long as the PROC MEANS step uses only two CLASS variables. &lt;EM&gt;Three&lt;/EM&gt; (or more) CLASS variables would be needed.&lt;/LI&gt;
&lt;LI&gt;You write "&lt;SPAN&gt;I am using the proc ttest," but it looks rather like you are using PROC GLM.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;The footnote of your sample output states that the confidence intervals are calculated using the Clopper-Pearson method. I'm only familiar with the&amp;nbsp;Clopper-Pearson confidence interval for a &lt;EM&gt;binomial proportion&lt;/EM&gt;, but I don't see where a binomial proportion is involved in your data.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;What do you mean by "pass the GMR variable value into the below aval value"?&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Thu, 14 Apr 2022 18:02:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculating-GMR-Geometric-Mean-ratio-at-two-different-visits/m-p/807888#M39735</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2022-04-14T18:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating GMR(Geometric Mean ratio)  at two different visits</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-GMR-Geometric-Mean-ratio-at-two-different-visits/m-p/807890#M39736</link>
      <description>HI ,&lt;BR /&gt;&lt;BR /&gt;1.  Sorry i forgot to add treatment variable in the dataset. I added now its in the below dataset and i updated my code as per your comments .&lt;BR /&gt;2. I  forgot to update tgroup macro to required variable now its updated in the below code.&lt;BR /&gt;3. Yes you are right i should use _type_=3  in proc means updated in the below code.&lt;BR /&gt;4. what i meant is previously i used proc ttest in separate code but it didnt worked so i changed the code to apply PROC GLM&lt;BR /&gt;5. We need to calculate 95% CI using clopper pearson method for particular geometric ratio&lt;BR /&gt;6. what i meant is i need to keep the value of geometric mean ratio between day1 / week 4. so i need to calculate GMR across two visists for each parameter. so how i have to calculate to get the value of GMR? Please take the example of 101 subject at day1 the avla value is 1.3 and week 4 value is 2.2  so what will be the GMR value between these two aval values? could you please  let me know your inputs with a code&lt;BR /&gt;&lt;BR /&gt;data have;&lt;BR /&gt;input subject $ paramcd $ avisit $ aval; trt01pn&lt;BR /&gt;cards;&lt;BR /&gt;101 aaa day1   1.3      1&lt;BR /&gt;101 aaa week4  2.2    1&lt;BR /&gt;102 aaa day1    1.1     2&lt;BR /&gt;102 aaa week4  3.3    2&lt;BR /&gt;103 aaa day1    2.8     1&lt;BR /&gt;103 aaa week4  4.7    1&lt;BR /&gt;104 aaa day1    3.8     2   &lt;BR /&gt;104 aaa week4  4.8    2&lt;BR /&gt;105 aaa day1     2.8   3&lt;BR /&gt;105 aaa week4  5.7   3&lt;BR /&gt;106 aaa day1    3.7    3&lt;BR /&gt;106 aaa week4  4.8   3&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;proc sort data=have ;&lt;BR /&gt;by avisit trt01pn ;&lt;BR /&gt;run ;&lt;BR /&gt;proc means data=have;&lt;BR /&gt;class avisit trt01pn;&lt;BR /&gt;var aval; (GMR value ?)&lt;BR /&gt;output out=mean n=n nmiss=nmiss mean=mean lclm=lclm uclm=uclm;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data gma;&lt;BR /&gt;set mean;&lt;BR /&gt;keep avisit n1 gmc1 lcl1 ucl1;&lt;BR /&gt;where _type_=3 and trt01pn =1;&lt;BR /&gt;n1=n;&lt;BR /&gt;gmc1=10**mean;&lt;BR /&gt;lcl1=10**lclm;&lt;BR /&gt;ucl1=10**uclm;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data gmb;&lt;BR /&gt;set mean;&lt;BR /&gt;keep avisit n2 gmc2 lcl2 ucl2;&lt;BR /&gt;where _type_=3 and trt01pn=2;&lt;BR /&gt;n2=n;&lt;BR /&gt;gmc2 =10**mean;&lt;BR /&gt;lcl2=10**lclm;&lt;BR /&gt;ucl2=10**uclm;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc glm data=have PLOTS(MAXPOINTS= 10000);&lt;BR /&gt;by avisit ;&lt;BR /&gt;class trt01pn;&lt;BR /&gt;model aval = trt01pn ;&lt;BR /&gt;means trt01pn / t cldiff clm;&lt;BR /&gt;ods output cldiffs=dmean ModelAnova=anova;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data rgm ;&lt;BR /&gt;set dmean;&lt;BR /&gt;where comparison="1 - 2";&lt;BR /&gt;keep avisit rgmc rlcl rucl;&lt;BR /&gt;rgmc=10**difference;&lt;BR /&gt;rlcl=10**lowercl;&lt;BR /&gt;rucl=10**uppercl;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc sort data=gma;&lt;BR /&gt;by avisit ;&lt;BR /&gt;proc sort data=gmb;&lt;BR /&gt;by avisit ;&lt;BR /&gt;proc sort data=rgm;&lt;BR /&gt;by avisit ;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data final;&lt;BR /&gt;merge gma gmb rgm ;&lt;BR /&gt;by avisit ;&lt;BR /&gt;run;&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Apr 2022 18:19:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculating-GMR-Geometric-Mean-ratio-at-two-different-visits/m-p/807890#M39736</guid>
      <dc:creator>mounikag</dc:creator>
      <dc:date>2022-04-14T18:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating GMR(Geometric Mean ratio)  at two different visits</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-GMR-Geometric-Mean-ratio-at-two-different-visits/m-p/807923#M39738</link>
      <description>&lt;P&gt;Thanks for the improved code and the explanations.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/339070"&gt;@mounikag&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;5. We need to calculate 95% CI using clopper pearson method for particular geometric ratio&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The geometric means are calculated from antibody levels (measured on a continuous scale). As I said, the "Clopper-Pearson method" I know is applicable to binomial proportions (see &lt;A href="https://documentation.sas.com/doc/en/statug/15.2/statug_freq_syntax08.htm#statug.freq.freqbcp" target="_blank" rel="noopener"&gt;PROC FREQ documentation&lt;/A&gt;), which I don't see in your data or code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;6. what i meant is i need to keep the value of geometric mean ratio between day1 / week 4. so i need to calculate GMR across two visists for each parameter. so how i have to calculate to get the value of GMR? Please take the example of 101 subject at day1 the avla value is 1.3 and week 4 value is 2.2 so what will be the GMR value between these two aval values? could you please let me know your inputs with a code&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Geometric means (and means in general) are calculated as a summary of two or more values, not for a single value of one subject. So I would expect these to be calculated from the AVAL values of several subjects (as shown in my first reply). The GMR would serve as a summary measure of all the individual ratios (like 2.2/1.3 for subject 101), e.g., within a treatment group.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Thu, 14 Apr 2022 20:30:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculating-GMR-Geometric-Mean-ratio-at-two-different-visits/m-p/807923#M39738</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2022-04-14T20:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating GMR(Geometric Mean ratio)  at two different visits</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-GMR-Geometric-Mean-ratio-at-two-different-visits/m-p/807928#M39740</link>
      <description>Thanks .. for clarification. I got your point .. thanks for taking time to answer my questions. It was so helpful</description>
      <pubDate>Thu, 14 Apr 2022 20:41:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculating-GMR-Geometric-Mean-ratio-at-two-different-visits/m-p/807928#M39740</guid>
      <dc:creator>mounikag</dc:creator>
      <dc:date>2022-04-14T20:41:15Z</dc:date>
    </item>
  </channel>
</rss>

