Chapter 46: The STANDARD Procedure


Overview: STANDARD Procedure

What Does the STANDARD Procedure Do?

The STANDARD procedure standardizes variables in a SAS data set to a given mean and standard deviation, and it creates a new SAS data set containing the standardized values.

Standardizing Data

Output 46.1 shows a simple standardization where the output data set contains standardized student exam scores. The statements that produce the output follow:

 proc standard data=score mean=75 std=5                out=stndtest;  run;  proc print data=stndtest;  run; 
Output 46.1: Standardized Test Scores Using PROC STANDARD
start example
 The SAS System                       1   Obs    Student       Test1     1    Capalleti    80.5388     2    Dubose       64.3918     3    Engles       80.9143     4    Grant        68.8980     5    Krupski      75.2816     6    Lundsford    79.7877     7    McBane       73.4041     8    Mullen       78.6612     9    Nguyen       74.9061    10    Patel        71.9020    11    Si           73.4041    12    Tanaka       77.9102 
end example
 

Output 46.2 shows a more complex example that uses BY- group processing. PROC STANDARD computes Z scores separately for two BY groups by standardizing life-expectancy data to a mean of 0 and a standard deviation of 1. The data are 1950 and 1993 life expectancies at birth for 16 countries . The birth rates for each country, classified as stable or rapid, form the two BY groups. The statements that produce the analysis also

  • print statistics for each variable to standardize

  • replace missing values with the given mean

  • calculate standardized values using a given mean and standard deviation

  • print the data set with the standardized values.

For an explanation of the program that produces this output, see Example 2 on page 1187.

Output 46.2: Z Scores for Each BY Group Using PROC STANDARD
start example
 Life Expectancies by Birth Rate               2  -------------------- PopulationRate=Stable --------------------                      The STANDARD Procedure                                     Standard       Name              Mean       Deviation              N       Label       Life50       67.400000        1.854724              5       1950 life expectancy       Life93       74.500000        4.888763              6       1993 life expectancy  --------------------- PopulationRate=Rapid --------------------                                    Standard       Name              Mean       Deviation              N       Label       Life50       42.000000        5.033223              8       1950 life expectancy       Life93       59.100000        8.225300             10       1993 life expectancy 
end example
 
 Standardized Life Expectancies at Birth               3                by a Countrys Birth Rate  Population     Rate        Country           Life50     Life93    Stable       France           -0.21567    0.51138    Stable       Germany           0.32350    0.10228    Stable       Japan            -1.83316    0.92048    Stable       Russia            0.00000   -1.94323    Stable       United Kingdom    0.86266    0.30683    Stable       United States     0.86266    0.10228    Rapid        Bangladesh        0.00000   -0.74161    Rapid        Brazil            1.78812    0.96045    Rapid        China            -0.19868    1.32518    Rapid        Egypt             0.00000    0.10942    Rapid        Ethiopia         -1.78812   -1.59265    Rapid        India            -0.59604   -0.01216    Rapid        Indonesia        -0.79472   -0.01216    Rapid        Mozambique        0.00000   -1.47107    Rapid        Philippines       1.19208    0.59572    Rapid        Turkey            0.39736    0.83888 



Base SAS 9.1.3 Procedures Guide (Vol. 1)
Base SAS 9.1 Procedures Guide, Volumes 1, 2, 3 and 4
ISBN: 1590472047
EAN: 2147483647
Year: 2004
Pages: 260

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net