<?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 Glimmix data transform and backtransform in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Glimmix-data-transform-and-backtransform/m-p/448174#M23431</link>
    <description>&lt;DIV id="messagebodydisplay_0_5" class="lia-message-body lia-component-body"&gt;
&lt;DIV class="lia-message-body-content"&gt;
&lt;P&gt;how do you get beta (PROC GLIMMIX Beta distribution) back on original scale?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt; &lt;STRONG&gt;glimMIX&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;CLASS Phase TRT DAY ID;&lt;/P&gt;
&lt;P&gt;MODEL DMIBWnew = TRT|phase /dist=beta DDFM=KR SOLUTION;&lt;/P&gt;
&lt;P&gt;Random DAY/residual SUBJECT=ID;&lt;/P&gt;
&lt;P&gt;LSmeans trt /DIFF ADJUST=SIMULATE (REPORT SEED=&lt;STRONG&gt;121211&lt;/STRONG&gt;) cl adjdfe=row;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;; &lt;STRONG&gt;Quit&lt;/STRONG&gt;;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Fri, 23 Mar 2018 14:45:04 GMT</pubDate>
    <dc:creator>AgReseach7</dc:creator>
    <dc:date>2018-03-23T14:45:04Z</dc:date>
    <item>
      <title>Proc Glimmix data transform and backtransform</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Glimmix-data-transform-and-backtransform/m-p/303407#M16119</link>
      <description>&lt;P&gt;How is data transformed in Glimmix for asin (&amp;amp; backtransformed) like the following code for lognormal transformation?&lt;/P&gt;
&lt;P&gt;How about in Proc Mixed?&lt;BR /&gt;I need to asin transform data in both Mixed &amp;amp; Glimmix. Just don't know the best way to backtransform vs. just transforming the means, SE, etc..., but have been told not to do that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt; &lt;STRONG&gt;GLIMMIX&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;CLASS ID TRT DAY;&lt;/P&gt;
&lt;P&gt;MODEL CPK = TRT day trt*day/dist=lognormal ddfm=kr solution;&lt;/P&gt;
&lt;P&gt;Random day /residual subject = ID(trt) type =CSH;&lt;/P&gt;
&lt;P&gt;LSMEANS TRT day/DIFF ADJUST=simulate;&lt;/P&gt;
&lt;P&gt;LSmeans trt*day/slicediff=day adjust=SIMULATE adjdfe=row;&lt;/P&gt;
&lt;P&gt;ODS OUTPUT lsmeans=lsmeans;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt; &lt;STRONG&gt;PRINT&lt;/STRONG&gt;;&amp;nbsp; &lt;STRONG&gt;RUN&lt;/STRONG&gt;; &lt;STRONG&gt;quit&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; btlsmeans;&lt;/P&gt;
&lt;P&gt;set lsmeans;&lt;/P&gt;
&lt;P&gt;omega=exp(stderr*stderr);&lt;/P&gt;
&lt;P&gt;btlsmean=exp(estimate)*sqrt(omega);&lt;/P&gt;
&lt;P&gt;btvar=exp(&lt;STRONG&gt;2&lt;/STRONG&gt;*estimate)*omega*(omega-&lt;STRONG&gt;1&lt;/STRONG&gt;);&lt;/P&gt;
&lt;P&gt;btsem=sqrt(btvar);&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt; &lt;STRONG&gt;PRINT&lt;/STRONG&gt;;&amp;nbsp; &lt;STRONG&gt;RUN&lt;/STRONG&gt;;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Oct 2016 01:41:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Glimmix-data-transform-and-backtransform/m-p/303407#M16119</guid>
      <dc:creator>AgReseach7</dc:creator>
      <dc:date>2016-10-09T01:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Glimmix data transform and backtransform</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Glimmix-data-transform-and-backtransform/m-p/303489#M16131</link>
      <description>&lt;P&gt;If transformation is your only option, you must transform your data prior to calling glimmix. And back transform estimates and confidence limits (but not SEs) after.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
call streamInit(767);
do i = 1 to 100;
    proportion = rand("uniform");
    output;
    end;
run;

data trans;
set test;
proportionTrans = arsin(sqrt(proportion));
run;

title "Untransformed";
proc glimmix data=trans;
model proportion=/s cl;
run;

title "Transformed";
proc glimmix data=trans;
model proportionTrans=/s cl;
ods output ParameterEstimates=transPE;
run;

title "Back-transformed";
proc sql;
select
    sin(estimate)**2 as Estimate,
    Alpha,
    sin(lower)**2 as Lower,
    sin(upper)**2 as Upper
from transPE
where effect="Intercept";
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Depending on the nature of your data, I would suggest to investigate using other statistical models before resorting to the arcsin transform.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRIKE&gt;Note, when using the lognormal distribution in glimmix, use the ilink option to get estimates on the original scale.&lt;/STRIKE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2016 19:06:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Glimmix-data-transform-and-backtransform/m-p/303489#M16131</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-11-01T19:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Glimmix data transform and backtransform</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Glimmix-data-transform-and-backtransform/m-p/308589#M16332</link>
      <description>&lt;P&gt;First of all, the arcsin(sqrt) transformation is only an approximation to the canonical link function for binomially distributed variables (logit). &amp;nbsp;So, if you are using GLIMMIX, don't bother with the arcsin approximation. Analyze the data without pretransforming, but use the DIST=BINOMIAL option in the MODEL statement. &amp;nbsp;You can then get all of the material on both the linked and original scale, including standard errors and confidence bounds.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For lognormally distributed data, it is a bit more complicated. &amp;nbsp;It is more than just log transforming the data. &amp;nbsp;Lognormal data is such that the logs of the value are normally distributed with a separable error term. &amp;nbsp;Just applying a log link in GLIMMIX assumes that not only are the log(values) normally distributed, but that the errors are multiplicative. &amp;nbsp;As a result, using the ILINK operator for DIST=LOGNORMAL does not return values on the original scale. &amp;nbsp;You will need to backtransform to get on the original scale, recalling that the mean of the lognormal distribution is not just the exponentiated value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve Denham&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2016 18:35:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Glimmix-data-transform-and-backtransform/m-p/308589#M16332</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2016-11-01T18:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Glimmix data transform and backtransform</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Glimmix-data-transform-and-backtransform/m-p/448174#M23431</link>
      <description>&lt;DIV id="messagebodydisplay_0_5" class="lia-message-body lia-component-body"&gt;
&lt;DIV class="lia-message-body-content"&gt;
&lt;P&gt;how do you get beta (PROC GLIMMIX Beta distribution) back on original scale?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt; &lt;STRONG&gt;glimMIX&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;CLASS Phase TRT DAY ID;&lt;/P&gt;
&lt;P&gt;MODEL DMIBWnew = TRT|phase /dist=beta DDFM=KR SOLUTION;&lt;/P&gt;
&lt;P&gt;Random DAY/residual SUBJECT=ID;&lt;/P&gt;
&lt;P&gt;LSmeans trt /DIFF ADJUST=SIMULATE (REPORT SEED=&lt;STRONG&gt;121211&lt;/STRONG&gt;) cl adjdfe=row;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;; &lt;STRONG&gt;Quit&lt;/STRONG&gt;;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 23 Mar 2018 14:45:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Glimmix-data-transform-and-backtransform/m-p/448174#M23431</guid>
      <dc:creator>AgReseach7</dc:creator>
      <dc:date>2018-03-23T14:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Glimmix data transform and backtransform</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Glimmix-data-transform-and-backtransform/m-p/701354#M33844</link>
      <description>&lt;P&gt;How would you back transform values that were a result of dist=beta link=logit?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 20:28:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Glimmix-data-transform-and-backtransform/m-p/701354#M33844</guid>
      <dc:creator>mthorne</dc:creator>
      <dc:date>2020-11-24T20:28:41Z</dc:date>
    </item>
  </channel>
</rss>

