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

I am running Proc Logistic and it works perfectly fine. However, I would like to define reference level. For example, I have a categorical variable of "Race" with 4 levels ; Chinese, Malay, Indian and Others. I would like to make SAS reads "Chinese" as my reference but now SAS is reading "Others" as my reference. I am using this statement. 

 

proc logistic data=WORK.IMPORT3 descending; /* SAS treats the levels of Adenovirus_E in a descending order (high to low)*/ 
class HDB Sick_Season Race Smoker Service;
model Adenovirus_E= HDB Sick_Season Race HDB*Race Smoker Service age_at_date_of_reprot_sick / expb;
run;

 Please let me know how to solve this? Many thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hi @SSin,

 

Use the REF= option after the variable name in the CLASS statement, e.g.

class HDB Sick_Season Race(ref='Chinese') Smoker Service;

View solution in original post

3 REPLIES 3
FreelanceReinh
Jade | Level 19

Hi @SSin,

 

Use the REF= option after the variable name in the CLASS statement, e.g.

class HDB Sick_Season Race(ref='Chinese') Smoker Service;
SSin
Obsidian | Level 7
Many thanks!
DWilson
Pyrite | Level 9

@SSin wrote:

I am running Proc Logistic and it works perfectly fine. However, I would like to define reference level. For example, I have a categorical variable of "Race" with 4 levels ; Chinese, Malay, Indian and Others. I would like to make SAS reads "Chinese" as my reference but now SAS is reading "Others" as my reference. I am using this statement. 

 

proc logistic data=WORK.IMPORT3 descending; /* SAS treats the levels of Adenovirus_E in a descending order (high to low)*/ 
class HDB Sick_Season Race Smoker Service;
model Adenovirus_E= HDB Sick_Season Race HDB*Race Smoker Service age_at_date_of_reprot_sick / expb;
run;

 Please let me know how to solve this? Many thanks!


Use the ref= option on the class statement, like this:

 

proc logistic data=one;
class x (ref='1');
model y=x;
run;

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1434 views
  • 2 likes
  • 3 in conversation