BookmarkSubscribeRSS Feed
ajb
Obsidian | Level 7 ajb
Obsidian | Level 7

Hello All, 

 

I'm using SAS, Version 9.2

 

Variables in my model:

  • Event: 0, 1

  • height: continuous

  • group: 0, 1 (ref=group 0)

  • height*group: interaction term

I currently need to estimate the OR for height by different groups

Do I do the following:

Exponentiate height to get OR for group = 0

Exponentiate height height*group to get OR for group =1

 

proc genmod data=temp;

class group;

model event(ref="0")=height group height*group/ link=logit dist=binomial;

estimate "height group 0" height 1 / exp;

estimate "height group 1" height 1 height*group 1/exp;

run;

 

I also have a model with 3 groups instead of 2.

  • Event: 0, 1

  • height: continuous

  • group: 0, 1, 2 (ref=group 0)

  • height*group1 

  • height*group2

would the code be 

proc genmod data=temp;

class group;

model event(ref="0")=height group height*group/ link=logit dist=binomial;

estimate "height group 0" height 1 / exp;

estimate "height group 1" height 1 height*group 1 0 0 /exp;

estimate "height group 1" height 1 height*group  0 1 0 /exp;

run;

1 REPLY 1

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 716 views
  • 0 likes
  • 2 in conversation