ilink will not return inverse values in the lsmeans statement with lognormal distribution

Reply
New Contributor
Posts: 2

ilink will not return inverse values in the lsmeans statement with lognormal distribution

See code below.

 

ods graphics on;

proc glimmix data=selected plots=studentpanel method=laplace;

class Block Year Plant_date Seed_rate N_rate;

model DM_lbac = Year|Plant_date|Seed_rate|N_rate/ dist=lognormal;

random Plant_date*Block(Year);

random Seed_rate*Block(Year Plant_Date);

lsmeans Year Plant_date N_rate/diff=all lines adjust=tukey plots=meanplot(ilink) ilink;

ods output Tests3=Anova diffs=firstorder_diffs lsmeans=firstorder_means;

run;

 

ilink will not provide the inverse values in the code above. Changed to dist=Poisson and the transformed values were provided.  Any ideas?  Is this a bug?

 

Running program in Enterprise Guide 7.12 on a 64 bit machine. 

SAS Super FREQ
Posts: 3,411

Re: ilink will not return inverse values in the lsmeans statement with lognormal distribution

Without your data we can't reproduce your problem. However, it looks like there is a lot of output so try this

Before the procedure call, put 

ODS SELECT LSMEANS;    

 

Does the output appear? If not, is there a WARNING in the log?

 

New Contributor
Posts: 2

Re: ilink will not return inverse values in the lsmeans statement with lognormal distribution

Unfortunately, it appears there is no way to back transform the means.  I contacted SAS Technical Support and received the following response:

 

The DIST=LOGNORMAL option in the MODEL statement does not use the Log link. It takes the log transformation of your response variable, and use the transformed value as the dependent variable in the model. The link function is the identify function, as listed in Table 45.12 in the documentation here. So the ILINK option does not really do anything because of the identity link function used in the analysis.

 

There are differences between a log-transformation on y (lognormal) and a log transformation on the mean (link=log). You might exponentiate the lsmeans for the lognormal model yourself using a SAS data step code, but the results will not be unbiased estimates of the means.

SAS Super FREQ
Posts: 3,411

Re: ilink will not return inverse values in the lsmeans statement with lognormal distribution

For a discussion of the differences between models of log(Y) and a log-link model, see the article "Error distributions and exponential regression models," which includes some interesting pictures.

Ask a Question
Discussion stats
  • 3 replies
  • 300 views
  • 0 likes
  • 2 in conversation