Turn on suggestions

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

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- PROC GLIMMIX, lsmeans odds ratios at a level of a binary covariate

Options

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

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

Posted 02-21-2020 07:26 PM
(735 views)

I am using the LSMEANS statement to request specific odds ratios in PROC GLIMMIX. I have an interaction term (binary by binary interaction) that I am requesting odds ratios for but would like to see the odds ratios at each level of another binary covariate.

a; binary 0,1

b; binary 0,1

c; binary 0,1

a*b interaction between a and b

`lsmeans a*b / ilink oddsratio cl diff;`

gives me beautiful output but once I try using the 'at' option to specify the value of another covariate SAS gives me a warning:

`lsmeans a*b / at c =1 ilink oddsratio cl diff;`

WARNING: Incorrect AT specification in LSMEANS statement. c is not a covariate in the model. The statement is

ignored.

I already know that this is because variable c is in the class statement and only continuous variables can be used in the 'at' option.

Does anyone know how to create odds ratios for an interaction at a certain level of a binary variable?

Thanks!

1 REPLY 1

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

I’m not 100% sure, but you might be able to change the combination of ref= statements in the class statement.

Class iv1(ref=‘0’) iv2(ref=‘1’);

I would assume the two reference categories would end up as the reference combination for the interaction.

A similar option might be to actually create your interaction variable and define the reference group.

**Available on demand!**

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

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.