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


SAS Code for Ranking Predictors
Bruce Ratner, PhD
Live chat by Boldchat
Live chat by Boldchat


Ranked_by_Importance

data IN;
input x1-x5 3.1;
cards;
0.1 0.7 9.1 0.3 0.2
0.0 0.1 2.2 0.7 0.8
0.1 0.2 1.7 0.4 0.5
0.1 0.4 1.8 0.2 0.2
0.1 0.6 4.6 0.8 0.6
0.0 0.2 0.2 1.0 0.2
0.2 0.0 1.0 1.0 0.4
0.1 0.4 1.9 0.7 0.1
0.0 0.8 0.0 0.2 0.3
0.0 0.6 3.3 0.2 0.9
;
run

proc corr data=IN rank outp=out noprint;
with x5;
var x1-x4;
run;

data out1;
set out;
if _TYPE_='MEAN' then delete;
if _TYPE_='STD' then delete;
drop _NAME_;
run;
proc transpose data=out1
out=out2 (rename=(  _1=n  _2=CORR_X5 ) ) prefix=_;
run;

data out2;
set out2;
abs_corr=abs(corr_X5);
PREDICTOR=_NAME_;
run;

data out3;
set out2;
if n ge 0 and abs_corr ge .0;
run;

proc sort data=out3;by descending abs_corr;
run;

data out3;
set out3;
rank=_n_;
run;

proc print data=out3 noobs;
var rank PREDICTOR CORR_X5;
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.