<?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: Assistance with adjusted geometric mean in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Assistance-with-adjusted-geometric-mean/m-p/856986#M42389</link>
    <description>I appreciate the explanation. The link was very helpful in understanding geometric mean since it is not used often in data analysis.</description>
    <pubDate>Fri, 03 Feb 2023 04:03:44 GMT</pubDate>
    <dc:creator>leaning2sas</dc:creator>
    <dc:date>2023-02-03T04:03:44Z</dc:date>
    <item>
      <title>Assistance with adjusted geometric mean</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Assistance-with-adjusted-geometric-mean/m-p/856499#M42358</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I am a basic user and have been trying to get a geometric mean of the variable of interest (concentration of a chemical) in the urine stratified by different years and age. Since this chemical is present in urine, it must be adjusted for creatinine. The variable of interest has been converted into its log, as it is not normally distributed. I used proc glimmix as this was nonnormal data and adjusted the model for creatinine, to obtain the predicted mean, and then used those to get the geometric means. I am not sure if my code is right or even if I am using the right approach. I would appreciate it if you could guide me regarding the same.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc glimmix data = NH.demo0118_phth_fv2;&lt;BR /&gt;class timephth;&lt;BR /&gt;model mbp = timephth creatinine_phth/solution; * URXUCR=urinary_creatinine;&lt;BR /&gt;output out=NH.ph_ad pred=p_mbp_mean;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc surveymeans data = NH.ph_ad allgeo;&lt;BR /&gt;domain age timephth;&lt;BR /&gt;var p_mbp_mean;&lt;BR /&gt;title "Geometric mean of XX years of MBP";&lt;BR /&gt;ODS output domaingeomeans = NH.mbp_gm;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2023 17:05:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Assistance-with-adjusted-geometric-mean/m-p/856499#M42358</guid>
      <dc:creator>leaning2sas</dc:creator>
      <dc:date>2023-01-31T17:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with adjusted geometric mean</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Assistance-with-adjusted-geometric-mean/m-p/856679#M42362</link>
      <description>&lt;P&gt;If you want an adjusted geometric mean, I would suggest the following code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glimmix data=&lt;SPAN&gt;NH.demo0118_phth_fv2&lt;/SPAN&gt;;
ods output lsmeans=geomeans;
class &lt;SPAN&gt;timephth&lt;/SPAN&gt;;
model value=&lt;SPAN&gt;timephth creatinine_phth&lt;/SPAN&gt;/dist=lognormal;
lsmeans timephth/cl;
run;

data geomeans2;
set geomeans;
mean=exp(estimate);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This will give you the geometric mean at the ARITHMETIC mean of creatinine_phth. You can also get confidence bounds by exponentiating the variables lower and upper in the geomeans dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 16:30:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Assistance-with-adjusted-geometric-mean/m-p/856679#M42362</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2023-02-01T16:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with adjusted geometric mean</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Assistance-with-adjusted-geometric-mean/m-p/856807#M42377</link>
      <description>&lt;P&gt;In case you wonder why Steve's suggestion works, recall that&amp;nbsp;&lt;SPAN&gt;the geometric mean for a set of positive numbers is equivalent to computing the arithmetic mean of the log-transformed data and then using the exponential function to back-transform the result.&amp;nbsp;&lt;/SPAN&gt;See&amp;nbsp;&lt;A href="https://blogs.sas.com/content/iml/2019/09/30/what-is-a-geometric-mean.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2019/09/30/what-is-a-geometric-mean.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 10:43:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Assistance-with-adjusted-geometric-mean/m-p/856807#M42377</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2023-02-02T10:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with adjusted geometric mean</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Assistance-with-adjusted-geometric-mean/m-p/856985#M42388</link>
      <description>&lt;P&gt;Thank you very much! I appreciate your assistance with the code. I was confused while writing the code, but now I understand.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 04:02:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Assistance-with-adjusted-geometric-mean/m-p/856985#M42388</guid>
      <dc:creator>leaning2sas</dc:creator>
      <dc:date>2023-02-03T04:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with adjusted geometric mean</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Assistance-with-adjusted-geometric-mean/m-p/856986#M42389</link>
      <description>I appreciate the explanation. The link was very helpful in understanding geometric mean since it is not used often in data analysis.</description>
      <pubDate>Fri, 03 Feb 2023 04:03:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Assistance-with-adjusted-geometric-mean/m-p/856986#M42389</guid>
      <dc:creator>leaning2sas</dc:creator>
      <dc:date>2023-02-03T04:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with adjusted geometric mean</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Assistance-with-adjusted-geometric-mean/m-p/856990#M42390</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Just a follow-up question, since I'm using a survey dataset, can the same codes be used? Also, how do I stratify by age? For e.g., I want creatinine adjusted geometric mean for age groups 6-12 and 13-18.&amp;nbsp;I really appreciate any help you can provide. Thanks in advance!&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 05:24:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Assistance-with-adjusted-geometric-mean/m-p/856990#M42390</guid>
      <dc:creator>leaning2sas</dc:creator>
      <dc:date>2023-02-03T05:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with adjusted geometric mean</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Assistance-with-adjusted-geometric-mean/m-p/858111#M42410</link>
      <description>&lt;P&gt;If the data come from a survey, you may want to change to one of the appropriate survey procedures such as SURVEYMEANS or SURVEYREG. SURVEYMEANS can provide geometric means directly, while SURVEYREG would require transformation/back-transformation. Shifting to the SURVEY procedures requires you to have knowledge of the complex survey design used to collect the data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are several ways to convert continuous variables such as age to categorical variables in a DATA step, but beware of loss of power/increase in standard error when doing so.&amp;nbsp; There is a lot of discussion in the literature about the dangers of categorization of continuous variables. From the short example you present, you would have to convince me that the difference between a 12 year old and a 13 year old (different categories) was markedly greater than between a 12 year old and a 6 year old (same category).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 18:29:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Assistance-with-adjusted-geometric-mean/m-p/858111#M42410</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2023-02-09T18:29:53Z</dc:date>
    </item>
  </channel>
</rss>

