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

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- How to compare the differences of relapse_count in proc genmod?

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 05-23-2023 03:38 AM
(680 views)

Hello, everyone. I just learned SAS, and I have been puzzled for many days. I hope you can help me.

My data is the number of relapses(Y) in different treatment groups, and I want to compare the difference in the number of relapses in different treatment groups under the least squares mean estimation. I used the lsmeans statement to compare the differences. It outputs the difference of the estimated coefficient(Beta1-Beta3, Beta2-Beta3). But I want to get the differences of Y.

my data is like:

obs

here is my SAS codes:

proc genmod data=a;

class group(ref="3") id/param=glm;

model relapse_count=group/link=log dist=negbin offset=lntime;

repeated subject=id;

lsmeans group/cl ilink exp ;

estimate '2-1' group -1 1 0/exp;

estimate '1-3' group 1 0 -1/exp;

estimate '2-3' group 0 1 -1/exp;

run;

1 ACCEPTED SOLUTION

Accepted Solutions

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

4 REPLIES 4

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

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

Thank you@StaDave.

The link contains the answer I want. But when I run the NLmeans code, I get a WARNING: No call to parse macro "NLMEANS".

Being a beginner, I don't quite know the solution to this problem. Can you help me?

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

I'm sorry I typed your name wrong.

Thank@StatDave.

Thank@StatDave.

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

As noted in red at the top of the documentation for the NLMeans and NLEST macros, these macros should be directly callable in SAS 9.4M6 or later. But if, for some reason, either of these is not found, then they can be downloaded and defined in your SAS session as discussed at the links provided above. Note that the NLMeans macro calls the NLEST macro so both are needed. You can check their availability in your SAS session and check their versions using the following calls. I suggest using the latest versions which, as noted in their documentation, are 1.9 for NLEST and 1.4 for NLMeans.

```
%nlest(v)
%nlmeans(v)
```

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. **Registration is now open through August 30th**. Visit the SAS Hackathon homepage.

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.