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

In SAS EM, if you specify a variable as a nominal variable, then in the regression results, it will automatically drop one value as the base level. How can I check which value the software dropped after I run the analysis?

1 ACCEPTED SOLUTION

Accepted Solutions
gcjfernandez
SAS Employee

SAS EM  uses the last level as the reference level after sorting the nominal variable alphabetically.

View solution in original post

8 REPLIES 8
gcjfernandez
SAS Employee

SAS EM  uses the last level as the reference level after sorting the nominal variable alphabetically.

ycenycute
Obsidian | Level 7
Thank you. Is there a way we can change this or choose the base level on our own?
gcjfernandez
SAS Employee

You could recode the level you want to use as the baseline by adding 'z' in front of the current level. In SAS EM you can do this using the replacement node- select the nominal variable editor and specify your modified levels.

ycenycute
Obsidian | Level 7
Got you. Thanks so much. Also wondering if I manually create dummy indicators for categorical variable, then I can choose to drop one dummy as the base level. Then when I include the rest dummy indicators in the model, the results show 0 behind the name of the dummy indicator. Does this mean the coefficient is for dummy _indicator = 0? This is quite counter-intuitive to me. How does SAS EM treat dummy indicators when running regression?
gcjfernandez
SAS Employee

When you create a dummy variable with 0 and 1, by default level I will be assigned as the base line and 0 versus I tested.

 

Therefore  when creating the dummy variable, assign the level of interest to 0 and reference level to 1.

 

 

ycenycute
Obsidian | Level 7
I mean I manually create four dummy indicators for a categorical variable with 4 categories, then I drop one of the dummy indicator as the base level. But when I include the rest 3 dummy indicators in the model, how do those dummies work? By default, they are 1 for yes, 0 for no, but it seems to show the coefficient for 0. Are you suggesting I should set 1 for no and 0 for yes? If so, how shall I change that?
gcjfernandez
SAS Employee

You need to recreate the dummy variables (where assign 0 to yes and 1 to NO) in a data step.

Because by default between 0 and 1, 1 will be assigned to base level.

 

Other option: If you can substitute the HPGLM node for the Reg node, then you can specify the class level you want to specify as the base level in the properties.

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!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 8 replies
  • 1241 views
  • 0 likes
  • 2 in conversation