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.
- 1:
– IntegerInput
-
On entry: , the number of blocks the full dataset was split into.
Constraint:
.
- 2:
– 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:
– Integer *Output
-
On exit: the number of valid observations, that is the number of observations with
, for .
- 4:
– double *Output
-
On exit: , the mean.
- 5:
– double *Output
-
On exit: , the standard deviation.
- 6:
– double *Output
-
On exit: , the coefficient of skewness.
- 7:
– double *Output
-
On exit: , the coefficient of kurtosis.
- 8:
– double *Output
-
On exit: the smallest value.
- 9:
– double *Output
-
On exit: the largest value.
- 10:
– doubleCommunication Array
-
Note: the dimension,
dim, of the array
rcomm
must be at least
- , when .
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:
– NagError *Input/Output
-
The NAG error argument (see
Section 3.7 in How to Use the NAG Library and its Documentation).
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.