NAG Library Routine Document
G01AUF combines sets of summaries produced by G01ATF
|SUBROUTINE G01AUF (
||B, MRCOMM, PN, XMEAN, XSD, XSKEW, XKURT, XMIN, XMAX, RCOMM, IFAIL)
||B, PN, IFAIL
||MRCOMM(20,B), XMEAN, XSD, XSKEW, XKURT, XMIN, XMAX, RCOMM(20)
Assume a dataset containing
observations, denoted by
and a set of weights,
, has been split into
blocks, and each block summarised via a call to G01ATF
. Then G01AUF takes the
communication arrays returned by G01ATF
and returns the mean (
), standard deviation (
), coefficients of skewness (
) and kurtosis (
), and the maximum and minimum values for the whole dataset.
For a definition of
see Section 3
West D H D (1979) Updating mean and variance estimates: An improved method Comm. ACM 22 532–555
- 1: B – INTEGERInput
On entry: , the number of blocks the full dataset was split into.
- 2: MRCOMM(,) – REAL (KIND=nag_wp) arrayCommunication Array
: each column of MRCOMM
must contain the information returned in RCOMM
from one of the runs of G01ATF
- 3: PN – INTEGEROutput
On exit: the number of valid observations, that is the number of observations with
, for .
- 4: XMEAN – REAL (KIND=nag_wp)Output
On exit: , the mean.
- 5: XSD – REAL (KIND=nag_wp)Output
On exit: , the standard deviation.
- 6: XSKEW – REAL (KIND=nag_wp)Output
On exit: , the coefficient of skewness.
- 7: XKURT – REAL (KIND=nag_wp)Output
On exit: , the coefficient of kurtosis.
- 8: XMIN – REAL (KIND=nag_wp)Output
On exit: the smallest value.
- 9: XMAX – REAL (KIND=nag_wp)Output
On exit: the largest value.
- 10: RCOMM() – REAL (KIND=nag_wp) arrayCommunication Array
: an amalgamation of the information held in MRCOMM
. This is in the same format as RCOMM
- 11: IFAIL – INTEGERInput/Output
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.
unless the routine detects an error or a warning has been flagged (see Section 6
6 Error Indicators and Warnings
If on entry
, explanatory error messages are output on the current error message unit (as defined by X04AAF
Errors or warnings detected by the routine:
On entry, .
On entry, MRCOMM
is not in the expected format.
On entry, the number of valid observations is zero.
On exit we were unable to calculate XSKEW
. A value of
has been returned.
On exit we were unable to calculate XSD
. A value of
has been returned.
The order that the
communication arrays are stored in MRCOMM
is arbitrary. Different orders can lead to slightly different results due to numerical accuracy of floating point calculations.
Both G01AUF and G01ATF
consolidate results from multiple summaries. Whereas the former can only be used to combine summaries calculated sequentially, the latter combines summaries calculated in an arbitrary order allowing, for example, summaries calculated on different processing units to be combined.
This example summarises some simulated data. The data is supplied in three blocks, the first consisting of observations, the second observations and the last observations. Summaries are produced for each block of data separately and then an overall summary is produced.
9.1 Program Text
Program Text (g01aufe.f90)
9.2 Program Data
Program Data (g01aufe.d)
9.3 Program Results
Program Results (g01aufe.r)