27.03.2013 Views

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

320 CROSSTABS<br />

• Variables named before the first BY on a table list are row variables, and variables named<br />

after the first BY on a table list are column variables.<br />

• When the table list specifies two dimensions (one BY keyword), the first variable before<br />

BY is crosstabulated with each variable after BY, then the second variable before BY with<br />

each variable after BY, and so on.<br />

• Each subsequent use of the keyword BY on a table list adds a new dimension to the tables<br />

requested. Variables named after the second (or subsequent) BY are control variables.<br />

• When the table list specifies more than two dimensions, a two-way subtable is produced<br />

for each combination of values of control variables. The value of the last specified control<br />

variable changes the most slowly in determining the order in which tables are displayed.<br />

• You can name more than one variable in each dimension.<br />

General Mode<br />

• The actual keyword TABLES can be omitted in general mode.<br />

• In general mode, both numeric and string variables can be specified. Long strings are<br />

truncated to short strings for defining categories.<br />

• The keywords ALL and TO can be specified in any dimension. In general mode, TO refers<br />

to the order of variables in the working data file and ALL refers to all variables defined in<br />

the working data file.<br />

Example<br />

CROSSTABS TABLES=FEAR BY SEX BY RACE.<br />

• This example crosstabulates FEAR by SEX controlling for RACE. In each subtable, FEAR<br />

is the row variable and SEX is the column variable.<br />

• A subtable is produced for each value of the control variable RACE.<br />

Example<br />

CROSSTABS TABLES=CONFINAN TO CONARMY BY SEX TO REGION.<br />

• This command produces crosstabulations of all variables in the working data file between<br />

and including CONFINAN and CONARMY by all variables between and including SEX and<br />

REGION.<br />

Integer Mode<br />

• In integer mode, variables specified on TABLES must first be named on VARIABLES.<br />

• The keywords TO and ALL can be specified in any dimension. In integer mode, TO and<br />

ALL refer to the position and subset of variables specified on the VARIABLES subcommand,<br />

not to the variables in the working data file.<br />

Example<br />

CROSSTABS VARIABLES=FEAR (1,2) MOBILE16 (1,3)<br />

/TABLES=FEAR BY MOBILE16.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!