<?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: PROC MIXED backtransforming LSMEANS Diffs or LSMESTIMATE comparisons in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-backtransforming-LSMEANS-Diffs-or-LSMESTIMATE/m-p/691831#M33370</link>
    <description>By taking log transformations of the original scale, you're interpretation will necessarily be as % change anyway.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 15 Oct 2020 14:01:06 GMT</pubDate>
    <dc:creator>cminard</dc:creator>
    <dc:date>2020-10-15T14:01:06Z</dc:date>
    <item>
      <title>PROC MIXED backtransforming LSMEANS Diffs or LSMESTIMATE comparisons</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-backtransforming-LSMEANS-Diffs-or-LSMESTIMATE/m-p/691632#M33356</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on some mixed models where I am interested in the change of values from a baseline reading. However, I need to log-transform these in some instances. The second problem comes from these "changes" potentially being negative values. For example if I was using change in triglycerides from baseline, it's possible&amp;nbsp;that someone may have a decrease in triglycerides from 200 mg/dL to 150 mg/dL at the next reading. For the example, assuming the largest difference is 50 unit decrease. To overcome these negative values, I am planning to add a constant of the largest negative values plus one to all values like so:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ds;
set old;
if trig_chg ne . then do;
    trig_chgt = trig_chg + 51;
    logtrigc_chg = log(trigc_chgt);
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;So if I use my model code for non-log transformed values as shown below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mixed data=ds method=reml plots=NONE noclprint;
class treatment(ref='0') visit subj;
model logtrigc_chg = &amp;amp;baseline. treatment visit treatment*visit/ ddfm=kenwardroger;
repeated visit / subject=subj type=UN ;&amp;nbsp;
lsmeans treatment*visit / at means diff cl;
lsmestimate treatment "Placebo over time for &amp;amp;baseline." 0 1,
"Treatment over time for &amp;amp;baseline." 1 0,
"Treatment Vs Placebo for &amp;amp;baseline." 1 -1/cl alpha=0.05;&lt;BR /&gt; ods output lsmeans=lsmeans&lt;BR /&gt; diffs=diffs
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The output from "diff" in the LSMEANS and the third LSMESTIMATE statement are both working off of the log-value comparisons. I can report the individual statements in my LSMESTIMATE through exponentiating and subtracting the difference:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data lsmeans2;
set lsmeans;
	expest = exp(estimate) - 51;
	explow = exp(lower) - 51;
	expupr = exp(upper) - 51;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;What can I do for the difference comparisons? Is there anyway to back transform these for calculations? Or how can these be calculated?&lt;BR /&gt;I would like the point estimate and the 95% CI. I appreciate any insight anyone may have on this!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 18:56:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-backtransforming-LSMEANS-Diffs-or-LSMESTIMATE/m-p/691632#M33356</guid>
      <dc:creator>elg</dc:creator>
      <dc:date>2020-10-14T18:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MIXED backtransforming LSMEANS Diffs or LSMESTIMATE comparisons</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-backtransforming-LSMEANS-Diffs-or-LSMESTIMATE/m-p/691668#M33360</link>
      <description>&lt;P&gt;I suggest taking the ratio (instead of difference). So, the outcome would be trig_2/trig_1 where trig_2 is the triglyceride measure at the second time point, and trig_1 is the measure at baseline. Then take log(trig_2/trig_1) as the measure to be analyze. Of course, this assumes that trig_2 is measured at the same time point for all participants in study. For example, everyone has baseline and 6-mo follow-up.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 20:35:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-backtransforming-LSMEANS-Diffs-or-LSMESTIMATE/m-p/691668#M33360</guid>
      <dc:creator>cminard</dc:creator>
      <dc:date>2020-10-14T20:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MIXED backtransforming LSMEANS Diffs or LSMESTIMATE comparisons</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-backtransforming-LSMEANS-Diffs-or-LSMESTIMATE/m-p/691702#M33363</link>
      <description>&lt;P&gt;Thanks for your input&amp;nbsp;cminard. I have done other modeling with the actual values, but not ratios or these. There is a really big interest in keeping it in the actual change format though for interpretation.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 23:15:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-backtransforming-LSMEANS-Diffs-or-LSMESTIMATE/m-p/691702#M33363</guid>
      <dc:creator>elg</dc:creator>
      <dc:date>2020-10-14T23:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MIXED backtransforming LSMEANS Diffs or LSMESTIMATE comparisons</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-backtransforming-LSMEANS-Diffs-or-LSMESTIMATE/m-p/691804#M33367</link>
      <description>&lt;P&gt;Consider shifting to GLIMMIX, and using either a log link or a lognormal distribution.&amp;nbsp; For the former, the ILINK option will work for the differences between time points.&amp;nbsp; For the latter (log normal), you can derive the significances for differences in the log space (which is what you are getting from a log transform in MIXED).&amp;nbsp; Actual differences will have to be computed externally in a DATA step.&amp;nbsp; You can either look at differences between geometric means (simple exponentiating of the lsmean estimates), or at differences in the expected values (complex exponentiation that takes 3 lines of code, followed by the difference).&amp;nbsp; Note that neither of these backtransforms yields the standard error of the difference, although the second method depends on calculating a variance, from which a standard error of the backtransformed mean can be obtained.&amp;nbsp; See the documentation for the DIST= option in the MODEL statement of PROC GLIMMIX for the equations needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 12:37:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-backtransforming-LSMEANS-Diffs-or-LSMESTIMATE/m-p/691804#M33367</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-10-15T12:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MIXED backtransforming LSMEANS Diffs or LSMESTIMATE comparisons</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-backtransforming-LSMEANS-Diffs-or-LSMESTIMATE/m-p/691831#M33370</link>
      <description>By taking log transformations of the original scale, you're interpretation will necessarily be as % change anyway.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Oct 2020 14:01:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-backtransforming-LSMEANS-Diffs-or-LSMESTIMATE/m-p/691831#M33370</guid>
      <dc:creator>cminard</dc:creator>
      <dc:date>2020-10-15T14:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MIXED backtransforming LSMEANS Diffs or LSMESTIMATE comparisons</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-backtransforming-LSMEANS-Diffs-or-LSMESTIMATE/m-p/691861#M33371</link>
      <description>&lt;P&gt;Agreed - the p values obtained are based on differences in the log normal space.&amp;nbsp; My thought was to be able to present the results on the original scale as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 15:04:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-backtransforming-LSMEANS-Diffs-or-LSMESTIMATE/m-p/691861#M33371</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-10-15T15:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MIXED backtransforming LSMEANS Diffs or LSMESTIMATE comparisons</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-backtransforming-LSMEANS-Diffs-or-LSMESTIMATE/m-p/691924#M33379</link>
      <description>&lt;P&gt;Thank you cminard and Steve. Both of you have added great points for me to consider further.&amp;nbsp;I was overlooking reporting the differences as adjusted geometric mean ratios and specifying, but also appreciate the insight on modeling in GLIMMIX.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 18:09:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-backtransforming-LSMEANS-Diffs-or-LSMESTIMATE/m-p/691924#M33379</guid>
      <dc:creator>elg</dc:creator>
      <dc:date>2020-10-15T18:09:58Z</dc:date>
    </item>
  </channel>
</rss>

