turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- General Programming
- /
- ilink will not return inverse values in the lsmean...

Topic Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-22-2016 04:31 PM

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.

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to kbalkcom

06-28-2016 01:32 PM

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?

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Rick_SAS

06-29-2016 08:49 AM

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.

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to kbalkcom

06-29-2016 09:03 AM

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.