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

Hello SAS users,

Can anyone help me figure out why i'm not getting a SAS dataset containing the odds ratio in this code? I used the OD Output statement as i was modelling off from this paper below....but the OD OUTPUT statement in mine did not create the Odds Ratio output.

ChuksManuel_0-1594047512021.png

Here's my code

proc logistic data =newnsch3c;
class   smokes(Ref= '0') composite (ref='0')/param=glm ;
Model asthma (event ='1') = smokes composite smokes*composite;
ODS OUTPUT PARAMETERESTIMATES=lgsparms ODDSRATIOS=lgsodds;
BY _Imputation_;
run;

Please any help will be appreciated.

 

1 ACCEPTED SOLUTION

Accepted Solutions
SAS_Rob
SAS Employee

when you have an interaction involving all the main effects in the model, the odds ratios are not reported by default.  Instead you need to use the ODDSRATIO statement to request the specific odds ratios you are interested in.

 

The link below has a good discussion of how to report and request odds ratios when you have an interaction.

https://support.sas.com/kb/24/455.html 

View solution in original post

3 REPLIES 3
SteveDenham
Jade | Level 19

Without seeing the log, and maybe the dataset newnsch3c, I'm not too sure why you aren't getting any odds ratios.  I suspect it has something to do with what you did earlier in PROC MI to generate the dataset, so perhaps you could share that code.

 

SteveDenham

pink_poodle
Barite | Level 11

Could you please attach a paper, or tell which paper it is that you got the picture from?

SAS_Rob
SAS Employee

when you have an interaction involving all the main effects in the model, the odds ratios are not reported by default.  Instead you need to use the ODDSRATIO statement to request the specific odds ratios you are interested in.

 

The link below has a good discussion of how to report and request odds ratios when you have an interaction.

https://support.sas.com/kb/24/455.html 

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
  • 3 replies
  • 568 views
  • 1 like
  • 4 in conversation