naginterfaces.library.mv.z_​scores

naginterfaces.library.mv.z_scores(x, nvar, isx, s, e)[source]

z_scores produces standardized values (-scores) for a data matrix.

For full information please refer to the NAG Library document for g03za

https://www.nag.com/numeric/nl/nagdoc_29.3/flhtml/g03/g03zaf.html

Parameters
xfloat, array-like, shape

must contain the th sample point for the th variable, , for , for .

nvarint

, the number of variables to be standardized.

isxint, array-like, shape

indicates whether or not the observations on the th variable are included in the matrix of standardized values.

If , the observations from the th variable are included.

If , the observations from the th variable are not included.

sfloat, array-like, shape

If , must contain the scaling (standard deviation), , for the th variable.

If , is not referenced.

efloat, array-like, shape

If , must contain the location shift (mean), , for the th variable.

If , is not referenced.

Returns
zfloat, ndarray, shape

The matrix of standardized values (-scores), .

Raises
NagValueError
(errno )

On entry, and .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, and values of .

Constraint: exactly elements of .

(errno )

On entry, and .

Constraint: .

Notes

In the NAG Library the traditional C interface for this routine uses a different algorithmic base. Please contact NAG if you have any questions about compatibility.

For a data matrix, , consisting of observations on variables, with elements , z_scores computes a matrix, , with elements such that:

where is a location shift and is a scaling factor. Typically, will be the mean and will be the standard deviation of the th variable and, therefore, the elements in column of will have zero mean and unit variance.