SUBROUTINE G03ZAF ( |
N, M, X, LDX, NVAR, ISX, S, E, Z, LDZ, IFAIL) |
INTEGER |
N, M, LDX, NVAR, ISX(M), LDZ, IFAIL |
REAL (KIND=nag_wp) |
X(LDX,M), S(M), E(M), Z(LDZ,NVAR) |
|
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: – 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.
Constraint:
for
NVAR values of
.
- 7: – REAL (KIND=nag_wp) arrayInput
-
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 parameter you should refer to
Section 3.3 in the Essential Introduction 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 parameter, 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).
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
X04AAF).
Standard accuracy is achieved.
Not applicable.
Means and standard deviations may be obtained using
G01ATF or
G02BXF.