## How do I interpret the log transformed CL for the difference in SAS GLM compared to normal scale

Frequent Contributor
Posts: 107

# How do I interpret the log transformed CL for the difference in SAS GLM compared to normal scale

``````ods trace on /listing;
ods output estimates=stat1;
ods output FITSTATISTICS=stat2;
ods output LSMEANCL=stat3;
ods output OverallANOVA=stat4;
ods output LsmeandiffCL=stat5;
ods output LsmeanCL=stat6;
proc glm data=new1;
class trt;
model clnr=trt/ss1 ss2 ss3 ss4;
lsmeans trt/pdiff cl alpha=0.10;
estimate 'A vs B' trt 1 -1;
quit; run;

ods trace on /listing``````
``````ods output estimates=stat7;
ods output FITSTATISTICS=stat8;
ods output LSMEANCL=stat9;
ods output OverallANOVA=stat10;
ods output LsmeandiffCL=stat11;
ods output LsmeanCL=stat12;``````
``proc glm data=newL1; class trt; model Lclnr=trt/ss1 ss2 ss3 ss4; lsmeans trt/pdiff cl alpha=0.10; estimate 'A vs B' trt 1 -1; quit;``

The code was used to analyze the attached data set  CLnr1.  The outputs from stat6 and stat12 were compared which are the Lsmean CI.

Stat6

Obs Effect Dependent TRT LowerCL LSMean UpperCL 1 2

 TRT CLnr A 102.984 114.62 126.256 TRT CLnr B 38.7635 47.9625 57.1615

Stat12

Obs Effect Dependent TRT LowerCL LSMean UpperCL 1 2

 TRT LCLnr A 4.55414 4.73281 4.91149 TRT LCLnr B 3.69979 3.84105 3.98231

The values of exp(lower CL) and exp(upper CL) give values for A (94-134) and B(40-53) which are close to the values for the normal scale.

However for stat5 for the difference on the normal scale I get:

bs Effect Dependent i j LowerCL Difference UpperCL TRT _TRT 1

 TRT CLnr 1 2 51.8246 66.6575 81.4904 A B

Whereas for stat 11 for the LClnr I get

s Effect Dependent i j LowerCL Difference UpperCL TRT _TRT 1

 TRT LCLnr 1 2 0.663993 0.891761 1.11953 A B

If I do the exp(lowerCL) and exp(UpperCL) I get (1.93-3.03) which is not in agreement with the normal scale.

Can someone explain to me why the normal scale and log scale agree for the CL for A and B but not for the difference between A and B for the normal and log scale?

Posts: 5,056

## Re: How do I interpret the log transformed CL for the difference in SAS GLM compared to normal scale

On the log scale, Difference is an estimate of log(A) - log(B) = log(A/B)

So, EXP(Difference) is an estimate of the ratio A/B, not A - B.

PG
Frequent Contributor
Posts: 107

## Re: How do I interpret the log transformed CL for the difference in SAS GLM compared to normal scale

I have used EXP(difference) which based upon your response is not correct.

Therefore my question is how should the log(A/B) ratio on the log scale be exponentiated  to have it reflect the A-B difference on the Normal scale for the respective confidence intervals?

Posts: 2,655

## Re: How do I interpret the log transformed CL for the difference in SAS GLM compared to normal scale

This is why it is a good idea to use GENMOD or GLIMMIX, so that results can be presented on both the transformed and original scale.  PROC GLM just can't do that.

Steve Denham

Frequent Contributor
Posts: 107

## Re: How do I interpret the log transformed CL for the difference in SAS GLM compared to normal scale

I was able to get the CI on the log scale (see code below) by use of the command LRCI. How do I get the CI

m on the normal scale per your suggestion?

Proc genmod data=y;

class trt;

model lauc144=trt/lrci;

run;

Frequent Contributor
Posts: 107

## Re: How do I interpret the log transformed CL for the difference in SAS GLM compared to normal scale

Thisresolved the issue.

Thanks

Posts: 2,116