BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
kgb
Calcite | Level 5 kgb
Calcite | Level 5

Hello! 

I would like to have the odds ratio spcified not according to a reference category of a variable but according to the "overall" risk.

I explain myself with an example:

 

explanatory variable name: hospital

explanatory  variable categories:

  • hospital
  • hospital
  • hospital
  • hospital

response variable:

  • 0=no readmission
  • 1=readmission

N total of observations= 12000;

Pct Readmissions= 3,5%

 

I would like to obtain the Odds ratios like these:

hospital A Vs overall avarage

hospital B Vs overall avarage

hospital C Vs overall avarage

hospital D Vs overall avarage

 

...so with a different parametrization from the classic one similar to the following:

 

hospital A Vs hospital D

hospital B Vs hospital D

hospital C Vs hospital D

 

if I use the following code I don't obtain results that I want, how should I change it?

proc logistic data=dataset-name PLOTS=all;
class hospital (param=effect );
model response variable(event='1')= hospital 
/noint;
run;

 

thank you very much in advance!

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ

See this note which compares the log odds for each group to the average log odds. 

View solution in original post

5 REPLIES 5
PeterClemmensen
Tourmaline | Level 20

"if I use the following code I don't obtain results that I want, how should I change it?"

 

What results do you obtain then?

 

param=effect is the default of PROC LOGISTIC

kgb
Calcite | Level 5 kgb
Calcite | Level 5
like this: OR IC
hospital A Vs hospital D ..... ...... ......
hospital B Vs hospital D ..... ...... ......
hospital C Vs hospital D ..... ...... ......
but
maybe the problem is that I don't change the class statement, but include a contrast or estimate statement for obtaining OR on
hospital A Vs overall avarage
hospital B Vs overall avarage
hospital C Vs overall avarage
hospital D Vs overall avarage?
Reeza
Super User

I think, you're referring to the GLM parameterization, you can use PARAM=GLM, but it's also the default I believe. 

Then you can take your estimates and exp(estimate) to get the odds ratio.

 

Or you can use the ODDSRATIO or ESTIMATE statements to build your hypothesis.

 

 

StatDave
SAS Super FREQ

See this note which compares the log odds for each group to the average log odds. 

kgb
Calcite | Level 5 kgb
Calcite | Level 5
thank you very much for your helpful indications!bye!

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
  • 5 replies
  • 1462 views
  • 3 likes
  • 4 in conversation