15.7.2.2 Summary Functions for Groups of Cells

These summary functions summarize over multiple cells within an area of the output chosen by the user and specified as part of the function name. The following basic areas are supported, in decreasing order of size:

TABLE

A section. Stacked variables divide sections of the output from each other. sections may span multiple layers.

LAYER

A section within a single layer.

SUBTABLE

A subtable, whose contents are the cells that pair an innermost row variable and an innermost column variable within a single layer.

The following shows how the output for the table expression hasBeenPassengerOfDesignatedDriver > hasBeenPassengerOfDrunkDriver BY isLicensedDriver > hasHostedEventWithAlcohol + hasBeenDesignatedDriver BY gender8 is divided up into TABLE, LAYER, and SUBTABLE areas. Each unique value for Table ID is one section, and similarly for Layer ID and Subtable ID. Thus, this output has two TABLE areas (one for isLicensedDriver and one for hasBeenDesignatedDriver), four LAYER areas (for those two variables, per layer), and 12 SUBTABLE areas.

Custom Tables
Male
licensed desDrv
Yes No Yes No
hostAlc hostAlc
Yes No Yes No
desPas Yes druPas Yes Table ID 1 1 1 1 2 2
Layer ID 1 1 1 1 2 2
Subtable ID 1 1 2 2 3 3
No Table ID 1 1 1 1 2 2
Layer ID 1 1 1 1 2 2
Subtable ID 1 1 2 2 3 3
No druPas Yes Table ID 1 1 1 1 2 2
Layer ID 1 1 1 1 2 2
Subtable ID 4 4 5 5 6 6
No Table ID 1 1 1 1 2 2
Layer ID 1 1 1 1 2 2
Subtable ID 4 4 5 5 6 6

CTABLES also supports the following areas that further divide a subtable or a layer within a section:

LAYERROW
LAYERCOL

A row or column, respectively, in one layer of a section.

ROW
COL

A row or column, respectively, in a subtable.

The following summary functions for groups of cells are available for each area described above, for both categorical and scale variables:

areaPCT or areaPCT.COUNT (“Area %”, PCT40.1)

A percentage of total counts within area.

areaPCT.VALIDN (“Area Valid N %”, PCT40.1)

A percentage of total counts for valid values within area.

areaPCT.TOTALN (“Area Total N %”, PCT40.1)

A percentage of total counts for all values within area.

Scale variables and totals and subtotals for categorical variables may use the following additional group cell summary function:

areaPCT.SUM (“Area Sum %”, PCT40.1)

Percentage of the sum of the values within area.


Footnotes

(8)

This is not necessarily a meaningful table. To make it easier to read, short variable labels are used.