BookmarkSubscribeRSS Feed
immy87
Calcite | Level 5

I am using SAS 9.4 to run a logistic regression predicting 5% weight loss (fiverper, 0 =No, 1 =yes) with time overweight (continuous variables) as the independent variable -

 

This is the first way I tried it - 

 

proc logistic descending;
class Fiveper (param=ref ref='1');
model time= now weight bmi raceth0_1 raceth0_2 college status level binge;
run;

 

** QUESTION** Do I need to class my other dichotomous variables - college, status, level, binge - or are they ref =0 automatically?

 

This is the second way I tried it -

 

proc logistic data =dummy_11;
class fiveper (ref = "1") raceth (ref = "0")college (ref="1") status (ref="1") level (ref="1") binge (ref="1") / param = ref;
model fiveper = now weight bmi raceth college status level binge / link = glogit;
run;

 

On the second way, I feel like it is not reference correctly, even though I put college (ref="1') it is coming up in the odds ratios tables as college 0 vs 1. 

 

Thank you for your help!


oddsratios.png
1 REPLY 1
Reeza
Super User

You set the reference level equal to 0. So the odds ratio will compare all other values to the reference level, 1. The 'other' values are 0, therefore the odds ratio becomes 0 vs 1. 

 

The second method is correct, especially if you're unsure of interpretations.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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