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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Example<br />

CROSSTABS 319<br />

• The variable FEAR defines the rows and the variable SEX defines the columns of the<br />

Crosstabulation table. CELLS requests row and column percentages, expected cell<br />

frequencies, and residuals.<br />

• STATISTICS requests the chi-square statistics displayed in the Chi-Square Tests table.<br />

CROSSTABS TABLES=JOBCAT BY EDCAT BY SEX BY INCOME3.<br />

• This table list produces a subtable of JOBCAT by EDCAT for each combination of values<br />

of SEX and INCOME3.<br />

VARIABLES Subcommand<br />

The VARIABLES subcommand is required for integer mode. VARIABLES specifies a list of variables<br />

to be used in the crosstabulations and the lowest and highest values for each variable.<br />

Values are specified in parentheses and must be integers. Non-integer values are truncated.<br />

• Variables can be specified in any order. However, the order in which they are named on<br />

VARIABLES determines their implied order on TABLES (see the TABLES subcommand<br />

below).<br />

• A range must be specified for each variable. If several variables can have the same range,<br />

it can be specified once after the last variable to which it applies.<br />

• CROSSTABS uses the specified ranges to allocate tables. One cell is allocated for each<br />

possible combination of values of the row and column variables before the data are read.<br />

Thus, if the specified ranges are larger than the actual ranges, workspace will be wasted.<br />

• Cases with values outside the specified range are considered missing and are not used in<br />

the computation of the table. This allows you to select a subset of values within<br />

CROSSTABS.<br />

• If the table is sparse because the variables do not have values throughout the specified<br />

range, consider using general mode or recoding the variables.<br />

Example<br />

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

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

• VARIABLES defines values 1 and 2 for FEAR, SEX, and RACE, and values 1, 2, and 3 for<br />

MOBILE16.<br />

TABLES Subcommand<br />

TABLES specifies the table lists and is required in both integer mode and general mode. The<br />

following rules apply to both modes:<br />

• You can specify multiple TABLES subcommands on a single CROSSTABS command. The<br />

slash between the subcommands is required; the keyword TABLES is required only in<br />

integer mode.

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

Saved successfully!

Ooh no, something went wrong!