For a data matrix, , consisting of observations on variables, with elements , g03zaf 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.
4
References
None.
5
Arguments
1: – IntegerInput
On entry: , the number of observations in the data matrix.
Constraint:
.
2: – IntegerInput
On entry: the number of variables in the data array x.
Constraint:
.
3: – Real (Kind=nag_wp) arrayInput
On entry: must contain the th sample point for the th variable, , for and .
4: – IntegerInput
On entry: the first dimension of the array x as declared in the (sub)program from which g03zaf is called.
Constraint:
.
5: – IntegerInput
On entry: , the number of variables to be standardized.
Constraint:
.
6: – Integer arrayInput
On entry: 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.
On entry: if , must contain the scaling (standard deviation), , for the th variable.
If , is not referenced.
Constraint:
if , , for .
8: – Real (Kind=nag_wp) arrayInput
On entry: if , must contain the location shift (mean), , for the th variable.
If , is not referenced.
9: – Real (Kind=nag_wp) arrayOutput
On exit: the matrix of standardized values (-scores), .
10: – IntegerInput
On entry: the first dimension of the array z as declared in the (sub)program from which g03zaf is called.
Constraint:
.
11: – IntegerInput/Output
On entry: ifail must be set to , . If you are unfamiliar with this argument you should refer to Section 3.4 in How to Use the NAG Library and its Documentation for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value is recommended. If the output of error messages is undesirable, then the value is recommended. Otherwise, if you are not familiar with this argument, the recommended value is . When the value is used it is essential to test the value of ifail on exit.
On exit: unless the routine detects an error or a warning has been flagged (see Section 6).
6
Error Indicators and Warnings
If on entry or , explanatory error messages are output on the current error message unit (as defined by x04aaf).