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;

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 3 replies
  • 826 views
  • 2 likes
  • 3 in conversation