OPTIONS PS=60 LS=72 NODATE NONUMBER; *** Data taken from SAS Procedure's Guide p.310 ***; *******************************; *** Standardizing variables ***; *******************************; DATA in; INPUT student section test1-test3; stest1=test1; stest2=test2; stest3=test3; CARDS; 238900545 1 94 91 87 254701167 1 95 96 97 238806445 2 91 86 94 999002527 2 80 76 78 263924680 1 92 40 85 459700886 2 75 76 80 416724915 2 66 69 72 999001230 1 82 84 80 242760674 1 75 76 70 990001252 2 51 66 91 ; PROC STANDARD DATA=in MEAN=0 STD=1 OUT=new; VAR stest1-stest3; PROC PRINT DATA=new; TITLE 'Standardizing Variables using PROC STANDARD'; *****************************************; *** Standardizing variables by levels ***; *** of a categorical variable ***; *****************************************; PROC SORT DATA=in; BY section; PROC STANDARD DATA=in MEAN=0 STD=1 OUT=new2; BY section; VAR stest1-stest3; PROC PRINT DATA=new2; TITLE2 'By levels of a categorical variable'; RUN;