BookmarkSubscribeRSS Feed
asifgeneral
Calcite | Level 5

Hello,

 

Can proc HPBIN handle categorical variables? If not what is the most efficient ways of collapsing categorical variables.

 

Thanks,   

5 REPLIES 5
PeterClemmensen
Tourmaline | Level 20

Yes, that should not be a problem. What does your data look like?

asifgeneral
Calcite | Level 5

Thanks for your response 

 

Here is the code that I am trying.

 

proc hpbin data=pg1.hmeq output=work.woebinn numbin=3 winsor;
input mortdue;
input yoj;
input job;
ods output mapping=mapping
run;
 

I am getting the output as expected for the two interval variables, but for job... 

 

ERROR: JOB is class variable, only interval variable is supported.

 

asifgeneral
Calcite | Level 5

Thanks for your response!

 

Being a novice in this field of credit scoring, I will take some time to digest the information. 🙂 

 

Will get back in case of any doubts. Thanks for your time and helping me out with the resources.

 

Regards,   

 

 

chapidi99
Fluorite | Level 6

Hello,

 

Why would you like to bin categorical variables? The categorical variables will already have categories. It is meaningful to categorise continious variables to create groups to measure the strength of the groups.

 

For example, you have the column House_Status with the categories "Own_House", 'Rented' and "Missing". How would you further categorise them. Even if you assign a numeric value as, for example,  Own_House = 0, Rented = 1 and Missing = 2 further categorising them wouldn't make any sense.

 

Many thanks,

Kiran Chapidi

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 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
  • 5 replies
  • 2022 views
  • 2 likes
  • 4 in conversation