Standardizes columns of a data matrix to have mean zero and variance one (S.A. Harding & D.A. Murray).
||Structures containing data to be standardized|
||Structures to contain output; by default the
OLD lists the variates or matrices to be standardized, and the
NEW parameter specifies a list of variates or matrices to store the standardized values. If
NEW is not set, the transformed data values overwrite the contents of the
OLD structures. If
NEW is set, it should be to structures of the same type (variate or matrix) as the corresponding
The standardized values are calculated as (x-mean(x)) / √(var(x)). If there are any missing values in the data these are omitted from the calculation.
Restrict is irrelevant with matrix structures. It should work as expected with variates.
Commands for: Calculations and manipulation.
CAPTION 'STANDARDIZE example','1) Standardizing a list of variates.';\ STYLE=meta,plain CALCULATE V[1...5] = URAND(123,4(0);10) STANDARDIZE V; NEW=Z[1...5] PRINT V PRINT Z CALC [PRINT=summary] Z=Z CAPTION '2) Standardizing a matrix.' MATRIX [ROWS=10; COLUMNS=5] M CALCULATE M$[*;1...5] = V STANDARDIZE M; NEW=N PRINT M PRINT N