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

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 2673 views
  • 2 likes
  • 4 in conversation