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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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