Standardizes columns of a data matrix to have mean zero and variance one (S.A. Harding & D.A. Murray).
No options
Parameters
OLD = variates or matrices |
Structures containing data to be standardized |
---|---|
NEW = variates or matrices |
Structures to contain output; by default the OLD structures are overwritten |
Description
The parameter 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 OLD
structures.
Options: none.
Parameters: OLD
, NEW
.
Method
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.
Action with RESTRICT
Restrict is irrelevant with matrix structures. It should work as expected with variates.
See also
Function: STANDARDIZE
.
Commands for: Calculations and manipulation.
Example
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