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

SAS Code for Smoothplot
Bruce Ratner, PhD

 ~~~~~~~~~~~~~~~~~~~~~~~%let X=X1; %let slice_X=10; title " Smoothplot - Y (0-1) vs. &X "; data IN; input X1 X2; cards; 13 14 17 19 54 43 23 88 11 77 09 33 32 53 10 12 51 52 13 14 17 19 43 10 88 98 77 25 33 76 53 41 12 15 52 53 83 76 43 41 13 14 17 19 32 53 10 12 51 52 13 14 17 19 43 10 88 98 77 25 33 76 53 41 12 15 52 53 83 76 43 41 ; run; data IN; set IN; Y=RAND('BERNOULLI', 1/3) ; data smooth; set IN; wt=1; run; proc print;run; data score; set smooth; keep wt Y &X; run; data notdot; set score; if &X 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 &X ; run; data score_X; set scoresam; if &X ne . then cum_n+wt; if &X = . then slice_X =.; else slice_X=floor(cum_n*&slice_X/(n+1)); drop cum_n n; run; proc summary data=score_X nway; class slice_X ; var &X Y; output out=smout_&X mean= sm_&X sm_&Y/noinherit; run; proc print data=smout_&X;run; data sliced_X; set smout_&X; logit_Y=log( sm_Y/(1-sm_Y)); if sm_Y=1 then logit_Y= 7; if sm_Y=0 then logit_Y=-7; Prob_Y= exp(logit_Y)/((1+exp(logit_Y))); proc print data=sliced_X;run; proc plot data=sliced_X HPCT=80 VPCT=80;plot logit_Y*sm_&X; format logit_Y 6.2; run; proc plot data=sliced_X HPCT=80 VPCT=80;plot Prob_Y*sm_&X; format Prob_&Y 6.2; run; quit; 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.