The STANDARD function standardizes each column of an matrix. Each column of the input matrix is standardized to have a mean of zero and unit standard deviation, as shown in the following example:
use sashelp.class; read all var _NUM_ into X[colname=varNames]; close sashelp.class; stdx = standard( x ); print "Standardized Data", stdx[colname=varnames];
Figure 24.17: Standardized Data
Standardized Data |
stdx | ||
---|---|---|
Age | Height | Weight |
0.4583796 | 1.2996021 | 0.5477176 |
-0.21156 | -1.138435 | -0.703713 |
-0.21156 | 0.5779431 | -0.088975 |
0.4583796 | 0.0903357 | 0.1086191 |
0.4583796 | 0.2268658 | 0.1086191 |
-0.881499 | -0.982401 | -0.747623 |
-0.881499 | -0.494793 | -0.681758 |
1.1283191 | 0.0318228 | 0.5477176 |
-0.21156 | 0.0318228 | -0.703713 |
-0.881499 | -0.650828 | -0.02311 |
-1.551439 | -2.152658 | -2.174693 |
0.4583796 | 0.3829002 | -0.440254 |
-0.881499 | -1.177444 | -1.011082 |
1.1283191 | 0.8119947 | 0.5257627 |
1.7982586 | 1.884731 | 2.194337 |
-0.881499 | 0.4804216 | 1.2283203 |
1.1283191 | 0.9095162 | 1.4478695 |
-1.551439 | -0.943392 | -0.659803 |
1.1283191 | 0.8119947 | 0.5257627 |