g02hk computes a robust estimate of the covariance matrix for an expected fraction of gross errors.
- Type: System..::..Int32On entry: , the number of observations.Constraint: .
- Type: System..::..Int32On entry: , the number of columns of the matrix , i.e., number of independent variables.Constraint: .
- Type: array<System..::..Double,2>[,](,)[,][,]An array of size [dim1, m]Note: dim1 must satisfy the constraint:On entry: must contain the th observation for the th variable, for and .
- Type: System..::..DoubleOn entry: , the expected fraction of gross errors expected in the sample.Constraint: .
- Type: array<System..::..Double>()An array of size On exit: a robust estimate of the covariance matrix, . The upper triangular part of the matrix is stored packed by columns. is returned in , .
- Type: array<System..::..Double>()An array of size [m]On exit: the robust estimate of the location parameters , for .
- Type: System..::..Int32On entry: the maximum number of iterations that will be used during the calculation of the covariance matrix.Constraint: .
- Type: System..::..Int32On entry: indicates the amount of information on the iteration that is printed.
When printing occurs the output is directed to the current advisory message unit (see (X04ABF not in this release)).
- The value of , and (see [Accuracy]) will be printed at the first and every nitmon iterations.
- No iteration monitoring is printed.
- Type: System..::..DoubleOn entry: the relative precision for the final estimates of the covariance matrix.Constraint: .
- Type: System..::..Int32%On exit: the number of iterations performed.
For a set of observations on variables in a matrix , a robust estimate of the covariance matrix, , and a robust estimate of location, , are given by
where is a correction factor and is a lower triangular matrix found as the solution to the following equations:
|where||is a vector of length containing the elements of the th row of x,|
|is a vector of length ,|
|is the identity matrix and is the zero matrix,|
|and||and are suitable functions.|
g02hk uses weight functions:
for constants , and .
These functions solve a minimax problem considered by Huber (see Huber (1981)). The values of , and are calculated from the expected fraction of gross errors, (see Huber (1981) and Marazzi (1987)). The expected fraction of gross errors is the estimated proportion of outliers in the sample.
In order to make the estimate asymptotically unbiased under a Normal model a correction factor, , is calculated, (see Huber (1981) and Marazzi (1987)).
Huber P J (1981) Robust Statistics Wiley
Marazzi A (1987) Weights for bounded influence regression in ROBETH Cah. Rech. Doc. IUMSP, No. 3 ROB 3 Institut Universitaire de Médecine Sociale et Préventive, Lausanne
Errors or warnings detected by the method:
Some error messages may refer to parameters that are dropped from this interface (LDX) In these cases, an error in another parameter has usually caused an incorrect value to be inferred.
On entry, , or , or , or , or , or , or . On entry, a variable has a constant value, i.e., all elements in a column of are identical.
- The iterative procedure to find has failed to converge in maxit iterations.
- The iterative procedure to find has become unstable. This may happen if the value of eps is too large for the sample.
On successful exit the accuracy of the results is related to the value of tol; see [Parameters]. At an iteration let
and let . Then the iterative procedure is assumed to have converged when .
|(i)||the maximum value of the absolute relative change in|
|(ii)||the maximum absolute change in|
|(iii)||the maximum absolute relative change in|
The existence of , and hence , will depend upon the function (see Marazzi (1987)); also if is not of full rank a value of will not be found. If the columns of are almost linearly related, then convergence will be slow.
A sample of observations on three variables is read in and the robust estimate of the covariance matrix is computed assuming 10% gross errors are to be expected. The robust covariance is then printed.