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


SAS Code for Normalizing a Variable to Lie Within [0, 1]
Bruce Ratner, PhD

x
rx
rxx

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

data
IN;
do id=1 to 1200;
X = uniform(12345);
output;
end;
run;

proc univariate data=IN plot ;
var X;
run;

/* Normalize X via ranks */
proc rank data=IN normal=TUKEY out= X_RNORMAL;
var X;
ranks RX;
run;

proc univariate data=X_RNORMAL plot ;
var RX;
proc means data = X_RNORMAL min max;
var RX;
run;

/* substract min. value of RX,
divide by max. value of RX */

data X_RNORMAL;
set X_RNORMAL;
RXX=((RX+3.2608462)/3.2608462); 
proc means data = X_RNORMAL min max mean;
var RXX;
run;

/* Center RXX at mean=0.30
fiddle with std values to
yield 0<= RXX <=1 */
proc standard data=X_RNORMAL mean=.30 std=.09
out=X_RNORMALZ30;
var RXX;
run;
proc univariate data=X_RNORMALZ30 plot ;
var RXX;
proc means data = X_RNORMALZ30 min max mean;
var RXX;
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.