Data defines the model by dint of genetic programming, producing the best decile table.


Creating Dummy Variables Corresponding to Values of Character Variables
Bruce Ratner, Ph.D.
Live chat by Boldchat
Live chat by Boldchat


buys-fruits
data
buys;
infile cards dlm=',';
input id $ buy1 $ buy2 $ buy3 $ ;
cards;
br, apple, banana, pear
ar, nut, fig, apple
;
run;
proc print data=buys;
title1 ' ';
title2' input dataset BUYS ';
run;
proc sort data=buys;
by id;
run;
proc transpose data=buys out=out(drop=_name_);
by id;
var buy1-buy3;
run;
data out;
set out;
count=1;
run;
options missing='0';
proc transpose data=out out=FRUITS(drop=_name_);
by id;
var count;
id col1;
run;
proc print data=FRUITS;
title2' output, desired dataset FRUITS ';
run;

For more information about this article, call Bruce Ratner at 516.791.3544 or 1 800 DM STAT-1; or e-mail at br@dmstat1.com.
Sign-up for a free GenIQ webcast: Click here.