SPSS Crosstabs
The CROSSTABS command creates a cross-tabulation.
Contents
Usage
crosstabs /table=foo by bar.
To create a series of tables with foo as the row-wise variable in each, try:
crosstabs /table=foo by ham spam eggs.
To create an N-dimensional table, try:
crosstabs /table=foo by bar by baz.
Format
The default /FORMAT subcommand is /FORMAT=TABLES AVALUE. This causes SPSS to create tables (the alternative being NOTABLES) and sort values in ascending order (the alternative being DVALUE).
Cells
The default /CELLS subcommand is /CELLS=COUNT. This causes table cells to be populated with counts of observations.
Options are:
Name |
Effect |
COUNT |
count |
ROW |
row percent |
COLUMN |
column percent |
TOTAL |
table percent |
EXPECTED |
expected value |
RESIDUAL |
residual |
SRESIDUAL |
standardized residual |
ASRESIDUAL |
adjusted standardized residual |
ALL |
all of the above |
NONE |
display nothing |
If the /CELLS subcommand is specified without any options, the COUNT, ROW, COLUMN, and TOTAL options are selected automatically.
Statistics
The /STATISTICS subcommand causes statistics to be computed for the tabulated variables.
Name |
Effect |
CHISQ |
Pearson chi-square, likelihood ratio, Fisher's exact test, continuity correction, linear-by-linear association |
PHI |
phi |
CC |
contingency coefficient |
LAMBDA |
lambda |
UC |
uncertainty coefficient |
BTAU |
tau-b |
CTAU |
tau-c |
RISK |
risk estimate |
GAMMA |
gamma |
D |
Somers' d |
KAPPA |
Cohen’s kappa |
ETA |
eta |
CORR |
Spearman correlation, Pearson’s r |
ALL |
all of the above |
NONE |
no statistics |
Even if selected, a statistic is only calculated when appropriate.
If the /STATISTICS subcommand is specified without any options, the CHISQ option is selected automatically.
Missing
By default, SPSS will exclude observations with a user missing value for a tabulated variable. Add the /MISSING=TABLE subcommand to explicitly allow this behavior, or add /MISSING=INCLUDE subcommand to disable it.
