Turn on suggestions

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

Showing results for

- Home
- /
- Programming
- /
- Programming
- /
- Re: How to calculate the differences of the least squares means in the...

Options

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

☑ This topic is **solved**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 12-28-2022 08:37 AM
(653 views)

Hi,

I am now using the PROC GENMOD to do the poisson regression to obtain the incidence rate of the outcome, I can get the incidence rate of the outcome in two exposure levels by using ILINK option in the LSMEANS. Then I want to get the **incidence rate difference** between two exposure levels by using the DIFF option in the LSMEANS, however, it does not provide the difference's estimate and its confidence intervals on the scale of the mean (the inverse linked scale). Does anyone help me? And what is the inverse linked scale of poisson? I am really confused about the transformation from -4.2980 into 0.01360. can anyone show me how to do the transformation? Thanks.

Below is the code and the SAS output.

```
proc genmod data=anadata. diet;
class hieng_c;
model chd = hieng_c / dist=poisson link=log offset=log_follow_time;
lsmeans hieng_c/diff=control means ilink cl plots=none;
run;
```

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thank you for your reply!

After reading more materials, I find that difference in rates cannot be directly obtained from the LSMEANS, but can be obtained by using NLMeans macro, the NLEstimate macro, or from PROC NLMIXED, see this website for reference (http://support.sas.com/kb/37/344.html )

2 REPLIES 2

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

e to the power -4.298 gives you the mean shown.

I don't know why the differences don't show up on the original scale.

I don't know why the differences don't show up on the original scale.

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thank you for your reply!

After reading more materials, I find that difference in rates cannot be directly obtained from the LSMEANS, but can be obtained by using NLMeans macro, the NLEstimate macro, or from PROC NLMIXED, see this website for reference (http://support.sas.com/kb/37/344.html )

Are you ready for the spotlight? We're accepting content ideas for **SAS Innovate 2025** to be held May 6-9 in Orlando, FL. The call is **open **until September 16. Read more here about **why** you should contribute and **what is in it** for you!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.