nag_summary_stats_onevar_combine (g01auc) combines sets of summaries produced by
nag_summary_stats_onevar (g01atc).
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
nag_summary_stats_onevar (g01atc). Then nag_summary_stats_onevar_combine (g01auc) takes the
communication arrays returned by
nag_summary_stats_onevar (g01atc) 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
and
see
Section 3 in nag_summary_stats_onevar (g01atc).
- 1:
b – IntegerInput
On entry: , the number of blocks the full dataset was split into.
Constraint:
.
- 2:
mrcomm[] – const doubleCommunication Array
-
Note: where appears in this document, it refers to the array element
.
On entry: the
th column of
MRCOMM must contain the information returned in
rcomm from one of the runs of
nag_summary_stats_onevar (g01atc).
- 3:
pn – Integer *Output
On exit: the number of valid observations, that is the number of observations with
, for .
- 4:
xmean – double *Output
On exit: , the mean.
- 5:
xsd – double *Output
On exit: , the standard deviation.
- 6:
xskew – double *Output
On exit: , the coefficient of skewness.
- 7:
xkurt – double *Output
On exit: , the coefficient of kurtosis.
- 8:
xmin – double *Output
On exit: the smallest value.
- 9:
xmax – double *Output
On exit: the largest value.
- 10:
rcomm[] – doubleCommunication Array
On exit: an amalgamation of the information held in
mrcomm. This is in the same format as
rcomm from
nag_summary_stats_onevar (g01atc).
If
rcomm is
NULL,
rcomm is not referenced.
- 11:
fail – NagError *Input/Output
-
The NAG error argument (see
Section 3.6 in the Essential Introduction).
Not applicable.
Not applicable.
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 nag_summary_stats_onevar_combine (g01auc) and
nag_summary_stats_onevar (g01atc) 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.