G11BCF computes a marginal table from a table computed by
G11BAF or
G11BBF using a selected statistic.
For a dataset containing classification variables (known as factors) the routines
G11BAF and
G11BBF compute a table using selected statistics, for example the mean or the median. The table is indexed by the levels of the selected factors, for example if there were three factors A, B and C with
$3$,
$2$ and
$4$ levels respectively and the mean was to be tabulated the resulting table would be
$3\times 2\times 4$ with each cell being the mean of all observations with the appropriate combination of levels of the three factors. In further analysis the table of means averaged over C for A and B may be required; this can be computed from the full table by taking the mean over the third dimension of the table, C.
In general, given a table computed by
G11BAF or
G11BBF, G11BCF computes a sub-table defined by a subset of the factors used to define the table such that each cell of the sub-table is the selected statistic computed over the remaining factors. The statistics that can be used are the total, the mean, the median, the variance, the smallest and the largest value.
If on entry
${\mathbf{IFAIL}}={\mathbf{0}}$ or
${-{\mathbf{1}}}$, explanatory error messages are output on the current error message unit (as defined by
X04AAF).
Only applicable when
${\mathbf{STAT}}=\text{'V'}$. In this case a one pass algorithm is used as describe in
West (1979).
The sub-tables created by G11BCF and stored in
STABLE and, depending on
STAT, also in
AUXT are stored in the following way. Let there be
$m$ dimensions defining the table with dimension
$k$ having
${l}_{k}$ levels, then the cell defined by the levels
${i}_{1},{i}_{2},\dots ,{i}_{m}$ of the factors is stored in
$s$th cell given by
where
The data, given by
John and Quenouille (1977), is for 3 blocks of a
$3\times 6$ factorial experiment. The data can be considered as a
$3\times 6\times 3$ table (i.e., blocks
$\times $ treatment with
$6$ levels
$\times $ treatment with
$3$ levels). This table is input and the
$6\times 3$ table of treatment means for over blocks is computed and printed.