TABLES subcommand (CHISQUARE INDEPENDENCE command)
TABLES
specifies the table lists and is required in both integer mode and
general mode. The following rules apply:
- You can specify multiple
TABLES
subcommands on a singleCHISQUARE INDEPENDENCE
command. The slash between the subcommands is required; the keywordTABLES
is required only in integer mode. - Variables named before the first
BY
on a table list are row variables, and variables named after the firstBY
on a table list are column variables. - When the table list specifies two dimensions (one
BY
keyword), the first variable beforeBY
is crosstabulated with each variable afterBY
, then the second variable beforeBY
with each variable afterBY
, and so on. - Each subsequent use of the keyword
BY
on a table list adds a new dimension to the tables requested. Variables named after the second (or subsequent)BY
are control variables. - When the table list specifies more than two dimensions, a two-way subtable is produced for each combination of values of control variables. The value of the last specified control variable changes the most slowly in determining the order in which tables are displayed.
- You can name more than one variable in each dimension.
Example
CHISQUARE INDEPENDENCE
/TABLES=FEAR BY AGE BY REGION
- This example crosstabulates FEAR by AGE controlling for REGION. In each subtable, FEAR is the row variable and AGE is the column variable.
- A subtable is produced for each value of the control variable REGION.