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.
None.
-
1:
– Integer
Input
-
On entry: , the number of observations in the data matrix.
Constraint:
.
-
2:
– Integer
Input
-
On entry: the number of variables in the data array
x.
Constraint:
.
-
3:
– Real (Kind=nag_wp) array
Input
-
On entry: must contain the th sample point for the th variable, , for and .
-
4:
– Integer
Input
-
On entry: the first dimension of the array
x as declared in the (sub)program from which
g03zaf is called.
Constraint:
.
-
5:
– Integer
Input
-
On entry: , the number of variables to be standardized.
Constraint:
.
-
6:
– Integer array
Input
-
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.
Constraint:
for
nvar values of
.
-
7:
– Real (Kind=nag_wp) array
Input
-
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) array
Input
-
On entry: if
,
must contain the location shift (mean),
, for the
th variable.
If , is not referenced.
-
9:
– Real (Kind=nag_wp) array
Output
-
On exit: the matrix of standardized values (-scores), .
-
10:
– Integer
Input
-
On entry: the first dimension of the array
z as declared in the (sub)program from which
g03zaf is called.
Constraint:
.
-
11:
– Integer
Input/Output
-
On entry:
ifail must be set to
,
or
to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of means that an error message is printed while a value of means that it is not.
If halting is not appropriate, the value
or
is recommended. If message printing is undesirable, then the value
is recommended. Otherwise, the value
is recommended.
When the value or 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).
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
x04aaf).
Standard accuracy is achieved.
Means and standard deviations may be obtained using
g01atf or
g02bxf.