G07DAF finds the median, median absolute deviation, and a robust estimate of the standard deviation for a set of ungrouped data.
G07DAF first computes the median,
and from this the median absolute deviation can be computed,
Finally, a robust estimate of the standard deviation is computed,
where
is the value of the inverse standard Normal function at the point
.
G07DAF is based upon subroutine LTMDDV within the ROBETH library, see
Marazzi (1987).
Marazzi A (1987) Subroutines for robust estimation of location and scale in ROBETH Cah. Rech. Doc. IUMSP, No. 3 ROB 1 Institut Universitaire de Médecine Sociale et Préventive, Lausanne
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
X04AAF).
The computations are believed to be stable.
Unless otherwise stated in the
Users' Note, the routine may be called with the same actual array supplied for parameters
X and
Y, in which case the sorted data values will overwrite the original contents of
X. However this is not standard Fortran, and may not work on all systems.
The following program reads in a set of data consisting of eleven observations of a variable
. The median, median absolute deviation and a robust estimate of the standard deviation are calculated and printed along with the sorted data in output array
Y.