Programming the statistical procedures from SAS

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

Reply
Frequent Contributor
Posts: 91

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

TRTCLnrA102.984141114.620000126.255859
TRTCLnrB38.76354647.96250057.161454

 

Stat12

Obs Effect Dependent TRT LowerCL LSMean UpperCL 1 2

TRTLCLnrA4.5541364.7328124.911488
TRTLCLnrB3.6997953.8410513.982307

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

TRTCLnr1251.82463266.65750081.490368AB

Whereas for stat 11 for the LClnr I get

s Effect Dependent i j LowerCL Difference UpperCL TRT _TRT 1

TRTLCLnr120.6639930.8917611.119529AB

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?

Respected Advisor
Posts: 4,742

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: 91

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?  

Respected Advisor
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: 91

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: 91

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

Thisresolved the issue.

 

Thanks

Trusted Advisor
Posts: 2,114

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

When you take a log transform, you are now in the realm of the geometric distribution.  Google

geometric mean site:sas.com

for lots of information on your question.

Ask a Question
Discussion stats
  • 6 replies
  • 426 views
  • 2 likes
  • 4 in conversation