|
Data defines the model by dint of genetic programming, producing the best decile table.
|
|
Decile Analysis of X1 and X2 Based on Model Estimate Bruce Ratner, PhD |
|

data IN; input estimate x1 x2; cards; 0.13043 0.34417 14212.99 0.12995 0.05839 1908.11 0.12989 0.16754 538.77 0.12989 0.21690 548.25 0.13018 0.20600 7701.12 0.12987 0.02847 13.70 0.12997 0.16161 2575.19 0.12993 0.19051 1602.65 0.13001 0.04119 3528.26 0.12997 0.14310 2618.37 0.13052 0.15669 16449.72 0.12991 0.09827 1000.87 0.12991 0.21721 1075.69 0.12987 0.01520 0.92 0.13004 0.11046 4343.60 0.12987 0.00000 0.00 0.12987 0.07821 99.65 0.12988 0.08584 269.15 0.12987 0.01520 74.64 0.13034 0.08490 11955.23 0.12990 0.15751 765.21 0.12987 0.00000 0.00 0.13009 0.18811 5497.30 0.12987 0.02847 0.43 0.12992 0.06603 1324.78 0.12987 0.05418 56.53 0.12989 0.08070 531.29 0.12987 0.00000 0.00 0.12987 0.06894 31.39 0.12988 0.07111 266.42 0.12989 0.04096 438.18 0.12990 0.14044 622.98 0.12988 0.04826 161.93 0.12994 0.17002 1691.15 0.13015 0.26660 7036.72 0.12988 0.06159 139.83 0.12989 0.10339 535.98 0.13345 0.16660 7036.72 0.12588 0.09159 639.83 0.12389 0.19339 835.98 ; run;
data score; set IN; wt=1; run;
data notdot; set score; if estimate ne .; proc means data=notdot sum noprint; var wt; output out=samsize (keep=samsize) sum=samsize; run;
data scoresam (drop=samsize); set samsize score; retain n; if _n_=1 then n=samsize; if _n_=1 then delete; run;
proc sort data=scoresam ;by descending estimate; run;
data score; set scoresam; if estimate ne . then cum_n+wt; if estimate = . then dec=.; else dec=floor(cum_n*10/(n+1)); run;
proc summary data=score missing; class dec; var x1 x2; output out=sum_dec sum=sum_x1 sum_x2;
data grand_sum; set sum_dec; if dec=.; total_n = _FREQ_; total_x1 = sum_x1; total_x2 = sum_x2; drop _FREQ_ sum_x1 sum_x2 dec _type_; m=1; run;
data sum_dec; set sum_dec; if dec=. then delete; dec_size = _FREQ_; drop _TYPE_ _FREQ_; run;
data final; set sum_dec; cum_sum_x1+sum_x1; cum_sum_x2+sum_x2; m=1; run;
proc sort data=final; by m; run; proc sort data=grand_sum; by m; run;
data final; merge final grand_sum; by m; drop m; run;
data final; set final; depth_of_file+1; lift_base = (10*depth_of_file)/100; cum_total_x1 = (cum_sum_x1/total_x1); lift_x1 = (cum_sum_x1/total_x1)/lift_base; cum_total_x2 = (cum_sum_x2/total_x2); lift_x2 = (cum_sum_x2/total_x2)/lift_base;
Rate_x1= sum_x1/dec_size; Rate_x2= sum_x2/dec_size; /* Rate_x1 and Rate_x2 response rates are NOT printed in final Table. */ format lift_x1 Rate_x1 percent9.1; format lift_x2 Rate_x2 percent9.1; run;
data table; set final; if dec=0 then decc=' top '; if dec=1 then decc=' 2 '; if dec=2 then decc=' 3 '; if dec=3 then decc=' 4 '; if dec=4 then decc=' 5 '; if dec=5 then decc=' 6 '; if dec=6 then decc=' 7 '; if dec=7 then decc=' 8 '; if dec=8 then decc=' 9 '; if dec=9 then decc='bottom'; if dec ne .; run;
title2' Decile Analysis of X1 and X2 Based on Model Estimate '; proc print data=table d split='*' noobs; var decc dec_size sum_x1 cum_sum_x1 sum_x2 cum_sum_x2 lift_x1 lift_x2; label decc = 'DECILE' dec_size = 'NUMBER OF*CUSTOMERS' sum_x1 = 'TOTAL*X1' cum_sum_x1 = 'CUM*TOTAL*X1' sum_x2 = 'TOTAL*X2' cum_sum_x2 = 'CUM*TOTAL*X2' lift_x1 = 'C U M *LIFT X1' lift_x2 = 'C U M *LIFT X2' ; sum dec_size sum_x1 sum_x2; format lift_x1 percent9.1; format lift_x2 percent9.1; format sum_x1 cum_sum_x1 sum_x2 cum_sum_x2 comma10.1; 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. |
|
|