Chapter Contents

Previous

Next
The STANDARD Procedure

Example 1: Standardizing to a Given Mean and Standard Deviation


Procedure features:
PROC STANDARD statement options:
MEAN=
OUT=
STD=
VAR statement
Other features:
PRINT procedure

This example



Program
 Note about code
options nodate pageno=1 linesize=80 pagesize=60;
data score;
   length Student $ 9;
   input Student $ StudentNumber Section $
         Test1 Test2 Final @@;
   format studentnumber z4.;
   datalines;
Capalleti 0545 1 94 91 87  Dubose    1252 2 51 65 91
Engles    1167 1 95 97 97  Grant     1230 2 63 75 80
Krupski   2527 2 80 69 71  Lundsford 4860 1 92 40 86
Mcbane    0674 1 75 78 72  Mullen    6445 2 89 82 93
Nguyen    0886 1 79 76 80  Patel     9164 2 71 77 83
Si        4915 1 75 71 73  Tanaka    8534 2 87 73 76
;
 Note about code
proc standard data=score mean=75 std=5
              out=stndtest;

 Note about code
   var test1 test2;
run;
 Note about code
proc sql;
   create table combined as
   select old.student, old.studentnumber,
          old.section,
          old.test1, new.test1 as StdTest1,
          old.test2, new.test2 as StdTest2,
          old.final
   from score as old, stndtest as new
   where old.student=new.student;
 Note about code
proc print data=combined noobs round;
   title 'Standardized Test Scores for a College Course';
run;


Output
The data set contains variables with both standardized and original values. StdTest1 and StdTest2 store the standardized test scores that PROC STANDARD computes. [HTML Output]
 [Listing Output]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.