Building models with SAS Enterprise Miner, SAS Factory Miner, SAS Visual Data Mining and Machine Learning or just with programming

How to label values in a variable in Enterprise Miner?

Reply
Occasional Contributor
Posts: 11

How to label values in a variable in Enterprise Miner?

I have several 9-point liker scale variables in my input data node in the diagram. Is there any way that I can label them? Thus the 1 will show "Extremely likely" and 9 will show "Extremely unlikely" Thanks.

SAS Super FREQ
Posts: 306

Re: How to label values in a variable in Enterprise Miner?

You can use formats to have character values displayed for numeric values.  If you already have the data set created, you can run code similar to the following in a Program Editor:

libname myfmtlib " /* path to folder to save format definition */ ";

proc format library=myfmtlib;

value myscale 1='Extremely likely'

  5='Kind of likely'

  9='Extremely unlikely'

  other='n/a'

  ;

run;

options fmtsearch=(myfmtlib);

data libref.newdata;

format /* name of numeric columns you want format applied to */ myscale.;

set libref.olddata;

run;

After creating this data set libref.newdata that has the format applied, you will need to run and save this code in your Project Start Code in Enterprise MIner:

libname myfmtlib " /* path to folder to save format definition */ ";

options fmtsearch=(myfmtlib);

Then you should be able to create a data source in Enterprise Miner for this new data set, and run flows as usual.

Hope that works for you!

Ask a Question
Discussion stats
  • 1 reply
  • 507 views
  • 0 likes
  • 2 in conversation