The arboretum procedure



Yüklə 3,07 Mb.

səhifə144/148
tarix30.04.2018
ölçüsü3,07 Mb.
1   ...   140   141   142   143   144   145   146   147   148

 

The METHOD= option specifies the standardization statistic. By default,

PROC STDIZE uses the standard deviation (STD) as the METHOD=location measure.

            

            method=median



 

The OUTSTAT= option specifies the output statistic data set that contains

location and scale measurements plus other simple statistics.

           outstat=stdstats;




 

The VAR statement specifies a list of the numeric variables to be standardized.

   var  mortdue value yoj derog delinq

          clage ninq clno debtinc;




 

The BY statement standardizes observations separately in groups for

each level of the BY variable.

   by bad;

   title 'Standardize using METHOD=Median';

   title2 'For Each Level of the Target BAD';

run;



 

PROC PRINT lists the first 10 observations in the standardized data

set.

proc print data=stdhmeq(obs=10);



  title 'Partial Listing of the OUT= Standardized Data Set';

run;



 

PROC PRINT lists the first 10 observations without standardization (for

comparison purposes).

proc print data=hmeq(obs=10);

   title 'Partial Listing of the Unstandardized Data Set';

run;



 

PROC PRINT lists the OUTSTAT= location and scale measurement data set.

proc print data=stdstats;

   title 'Location and Scale Measures Data Set';

run;



The STDIZE Procedure

Example 2: Unstandardizing a Data Set

Features:

Using the UNSTDIZE and the METHOD=IN(data set) Options to Unstandardize a Data Set

q   

This example demonstrates how to unstandardize selected variables in the WORK.STDHMEQ standardized data



set that was created in Example 1 "Getting Started with the STDIZE Procedure".

Program

 

proc stdize data=stdhmeq 



            out=unhmeq

            method=in(stdstats)

            unstdize;        

 

   var  mortdue value yoj clno;



 

   by bad;

   title 'Unstandardizing a Data Set';

run;


 

proc print data=unhmeq(obs=10);

   title 'Partial Listing of the Unstandardized Data Set';

run;


Output

PROC PRINT Partial Listing of the Unstandardized Data Set

 

                Partial Listing of the Unstandardized Data Set



                  M                                                      D

                  O             R                   D                    E

                  R      V      E                 D E     C              B

            L     T      A      A                 E L     L     N  C     T

     O  B   O     D      L      S    J         Y  R I     A     I  L     I

     B  A   A     U      U      O    O         O  O N     G     N  N     N




     S  D   N     E      E      N    B         J  G Q     E     Q  O     C

      1 0 1700  97800 112000 HomeImp Office   3.0 0 0 -87.0825 -1 14   .     

      2 0 2000  64536  87400         Mgr      2.5 0 0 -33.2825 -1 24   .     

      3 0 2300 102370 120953 HomeImp Office   2.0 0 0 -89.4233 -1 13 -2.95317

      4 0 2400  98449 117195 HomeImp Office   4.0 0 0 -86.6040 -1 13 -4.85984

      5 0 2500   7229  44516 HomeImp Self      .  0 0  27.5842 -1 12   .     

      6 0 2500  71408  78600 HomeImp ProfExe  8.0 0 0  75.3175 -1 12   .     

      7 0 2900 103949 112505 HomeImp Office   1.0 0 0 -84.3135 -1 13 -4.49054

      8 0 2900 104373 120702 HomeImp Office   2.0 0 0 -78.8755 -1 13 -4.62581

      9 0 3000 104570 121729 HomeImp Office   2.0 0 0 -94.5314 -1 14 -2.48189

     10 0 3000  58000  71500 HomeImp Mgr     10.0 . 2  31.5175 -1 25   .   

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




 

The METHOD=IN(SAS Data Set) option identifies the data

set that contains measurement and location statistics for each variable. The

WORK.STDSTATS data set was created by using the OUTSTAT= data set option in

the PROC STDIZE step of Example 1. The UNSTDIZE option specifies to unstandardize

variables when METHOD=IN(SAS data set) is specified.

proc stdize data=stdhmeq 

            out=unhmeq

            method=in(stdstats)

            unstdize;        




 

The VAR statement specifies a list of numeric variables that you want

to unstandardize.

   var  mortdue value yoj clno;




 

The BY statement specifies to unstandardize the variables using the

values of the BY variable. The METHOD=IN(STDSTATS) data set must contain two

observations: _TYPE_ =LOCATION and _TYPE_=SCALE for each value of the BY variable.

   by bad;

   title 'Unstandardizing a Data Set';

run;



 

PROC PRINT prints the first 10 observations in the unstandardized data

set.

proc print data=unhmeq(obs=10);



   title 'Partial Listing of the Unstandardized Data Set';

run;





Dostları ilə paylaş:
1   ...   140   141   142   143   144   145   146   147   148


Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©genderi.org 2017
rəhbərliyinə müraciət

    Ana səhifə