BookmarkSubscribeRSS Feed
SGPS
Calcite | Level 5

Hi everyone,

I used the GENMOD procedure to obtain a Bayesian logistic regression model but am unsure how to obtain the adjusted odds ratios.

This is the code that I used:

data Normalprior;                                                                                                                     

input _type_ $ intercept X1 X2 X3;                                                                  

datalines;

Var 1e6 1e6 1e6 1e6

Mean 0 100 50 0

;                                                                                                                                      

                                                                                                                                       

proc genmod data=mydata descending;                                                                                                

model y=X1 X2 X3 / d=bin link=logit;                                                             

bayes seed=1 coeffprior=normal (input=Normalprior) nmc=50000 thin=5                                                                     

summary=all diagnostics=all plots=all outpost=postdata;                                                                                

run;

Is there a way to obtain the adjusted odds ratios in SAS or do I have to manually calculate it (if so how)?

Thanks in advance!

1 REPLY 1
SteveDenham
Jade | Level 19

Bad news, good news.  The bad news is that you will probably have to calculate them in a data step.  The good news is that the estimates that you need to exponentiate are easily obtainable from an ODS output statement.  Try adding

ods output postsummaries=postsummaries;

to your code.  The parameter estimates are on the log odds scale so exponentiating would give the adjusted odds ratios.

Hope this helps.

Steve Denham

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

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