The STANDARDIZE function computes standardized variables from an array of m variables (columns) and n observations (rows). The result is an m -column, n -row array where all columns have a mean of zero and a variance of one.
This routine is written in the IDL language. Its source code can be found in the file
standardize.pro
in the
lib
subdirectory of the IDL distribution.
Define an array with 4 variables and 20 observations.
FOR K = 0, 3 DO PRINT, MOMENT(array[K,*])
;
Compute the mean and variance of each variable using the MOMENT function. The skewness and kurtosis are also computed.
result = STANDARDIZE(array) ; Compute the standardized variables.
FOR K = 0, 3 DO PRINT, MOMENT(result[K,*])
;
Compute the mean and variance of each standardized variable using the MOMENT function. The skewness and kurtosis are also computed.
25.3050 25.2331 -0.454763 -1.10028
51.1700 27.4012 -0.356958 -1.19516
27.6200 13.3017 0.420289 0.104912
20.1950 26.0731 -0.363277 -1.24886
-7.67130e-07 1.00000 -0.454761 -1.10028
-3.65451e-07 1.00000 -0.356958 -1.19516