BookmarkSubscribeRSS Feed
mjalvarez
Calcite | Level 5

Hi community, 

 

I have a question about using PROC GLIMMIX fixed effects for a logistic regression. 

 

I am trying to estimate the effect of race (0 v 1), region (1 v 2), and 4 other covariates (all variables are categorical) on the likelihood of being selected as chief monitor. I want to treat region as a fixed effect. 

 

This is my code - 

proc glimmix;
class race region;
model cr = race region sex year citizen schooltype newaoa
/ dist=binary link=logit ddfm=bw solution;
random intercept / subject=race;
run;

 

My primary question is, how can I print the odds ratio of each predictor?

 

As a secondary question, Is this procedure the best approach for my question? 

 

Thank you all! 

 

2 REPLIES 2
PaigeMiller
Diamond | Level 26

@mjalvarez wrote:

 

My primary question is, how can I print the odds ratio of each predictor?


You use the ODDSRATIO option of the MODEL statement.

 

As a secondary question, Is this procedure the best approach for my question? 

 

Seems like it should work, but you say all variables are categorical, yet only two variables are in the CLASS statement, this seems questionable. Do you have specific concerns about it?

--
Paige Miller
mjalvarez
Calcite | Level 5
Hi Paige,
Thanks for the response! I added the ODDSRATIO option of the MODEL statement like you suggested. I realize I didn't add the covariates to the class statement which led to some odd odds ratios but I fixed it and all seems good. Thank you!

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

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1039 views
  • 0 likes
  • 2 in conversation