10-08-2016 09:41 PM
How is data transformed in Glimmix for asin (& backtransformed) like the following code for lognormal transformation?
How about in Proc Mixed?
I need to asin transform data in both Mixed & 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.
CLASS ID TRT DAY;
MODEL CPK = TRT day trt*day/dist=lognormal ddfm=kr solution;
Random day /residual subject = ID(trt) type =CSH;
LSMEANS TRT day/DIFF ADJUST=simulate;
LSmeans trt*day/slicediff=day adjust=SIMULATE adjdfe=row;
ODS OUTPUT lsmeans=lsmeans;
PROC PRINT; RUN; quit;
PROC PRINT; RUN;
10-09-2016 11:57 PM - edited 11-01-2016 03:06 PM
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.
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;
Depending on the nature of your data, I would suggest to investigate using other statistical models before resorting to the arcsin transform.
Note, when using the lognormal distribution in glimmix, use the ilink option to get estimates on the original scale.
11-01-2016 02:35 PM
First of all, the arcsin(sqrt) transformation is only an approximation to the canonical link function for binomially distributed variables (logit). 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. You can then get all of the material on both the linked and original scale, including standard errors and confidence bounds.
For lognormally distributed data, it is a bit more complicated. It is more than just log transforming the data. Lognormal data is such that the logs of the value are normally distributed with a separable error term. Just applying a log link in GLIMMIX assumes that not only are the log(values) normally distributed, but that the errors are multiplicative. As a result, using the ILINK operator for DIST=LOGNORMAL does not return values on the original scale. 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.
03-23-2018 10:45 AM
how do you get beta (PROC GLIMMIX Beta distribution) back on original scale?
CLASS Phase TRT DAY ID;
MODEL DMIBWnew = TRT|phase /dist=beta DDFM=KR SOLUTION;
Random DAY/residual SUBJECT=ID;
LSmeans trt /DIFF ADJUST=SIMULATE (REPORT SEED=121211) cl adjdfe=row;