|
Data defines the model by dint of genetic programming, producing the best decile table.
|
|
SAS Code for Performance of Model vs. Chance Model Bruce Ratner, PhD |
|
 data Model_CellCounts; input ACTUAL PREDICTED Count @@; datalines; 0 1 10 0 2 0 1 1 3 1 2 8 ; run;
proc freq data=Model_CellCounts; table ACTUAL*PREDICTED /chisq sparse out=D; weight Count; run;
proc transpose data=D out=transp; run;
data IMPROV; retain MODEL_TCCR; set transp; drop _LABEL_; if _NAME_=" ACTUAL" then delete; if _NAME_=" PREDICTED " then delete; if _NAME_="PERCENT" then CHANCE_TCCR=( ((col1+col2)**2)+((col3+col4)**2))/10000 ; if _NAME_="COUNT" then MODEL_TCCR=((col1+col4)/sum(of col1-col4))/1;
IMPROV= ((MODEL_TCCR- CHANCE_TCCR)/CHANCE_TCCR); if IMPROV=. then delete; run;
proc print data=IMPROV; var MODEL_TCCR CHANCE_TCCR IMPROV; format CHANCE_TCCR MODEL_TCCR IMPROV percent8.2; 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. |
|
|