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

Hi,

 

i am trying to find association between post op intolerance (PO_Intolerance__Y_N_1)- dependent variable and pattern of sewing during surgery (LOCATION_OS1)- exposure. Both have two categories.

PO_Intolerance__Y_N_1: yes vs no

LOCATION_OS1: entire vs partial

 

SAS code i used is:

proc logistic data=red.sleeve7;
class PO_Intolerance__Y_N_1(ref="N") LOCATION_OS1(ref="partial");
model PO_Intolerance__Y_N_1= LOCATION_OS1/scale=none aggregate;
run;

 

OR i received is :

Odds Ratio Estimates

Effect

Point Estimate

95% Wald
Confidence Limits

LOCATION_OS1 entire vs partial

0.182

0.107

0.310

 

please see attched for details of output.

 

I assumed that post op intolerance will be more likely in entire sewing group vs partial sewing group.

But the results are opposite.

Please let me know if it sample size played a role? numbers in each group played a role? or it is statistically sound to report the results?

 

Thanks.

 

 

 
1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Check your log. Specifically look at the notes to see what was modeled as the outcome, perhaps that is coded reverse to what you expect.

 

You can specify the outcome desired by using the effect option.

 

model varName (effect='no') = .... ;

View solution in original post

7 REPLIES 7
Reeza
Super User
You should add the PARAM=REF option.
Kyra
Quartz | Level 8

Hi!

 

with the code below;

proc logistic data=red.sleeve7;
   class PO_Intolerance__Y_N_1(ref="N") LOCATION_OS1(ref="partial")/param=reference;
   model PO_Intolerance__Y_N_1= LOCATION_OS1/scale=none aggregate;
   run;

 

output remains the same. Please see attched for details.

SAS Output

Odds Ratio EstimatesEffect Point Estimate 95% WaldConfidence LimitsLOCATION_OS1 entire vs partial
0.1820.1070.310
Reeza
Super User

Check your log. Specifically look at the notes to see what was modeled as the outcome, perhaps that is coded reverse to what you expect.

 

You can specify the outcome desired by using the effect option.

 

model varName (effect='no') = .... ;
Kyra
Quartz | Level 8

Hi!

 

Thank you for your help. I checked my dataset and there was mistake in coding. OR is now greater than 1 which i expected and it is insignificant which i believe is due to small numbers in Post op intolerance yes group.

 the output now is

 

SAS Output

Response ProfileOrderedValue PO_Intolerance__Y_N_1 TotalFrequency12
N340
Y13

SAS Output

Odds Ratio EstimatesEffect Point Estimate 95% WaldConfidence Limits LOCATION_OS1 entire vs partial
1.4050.4514.383
Reeza
Super User
You have an imbalance in your sizes Y=13 is significantly smaller than the No group. You may want to consider adding a prior or oversampling.
Kyra
Quartz | Level 8

I am sorry but i do not know what a prior or oversampling is. Do you have any material on that i can read. Thanks for your help.

Reeza
Super User

https://gking.harvard.edu/category/research-interests/methods/rare-events

 

https://statisticalhorizons.com/logistic-regression-for-rare-events

 

Search for : "logistic regression rare events" for more material. 

For SAS specific articles, search on lexjansen.com

 


@Kyra wrote:

I am sorry but i do not know what a prior or oversampling is. Do you have any material on that i can read. Thanks for your help.


 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 7 replies
  • 1526 views
  • 0 likes
  • 2 in conversation