# Crosstabs

This feature requires the Statistics Base option.

The Crosstabs procedure forms two-way and multiway tables and provides a variety of tests and measures of association for two-way tables. The structure of the table and whether categories are ordered determine what test or measure to use.

With the exception of partial gamma coefficients, Crosstabs' statistics and measures of
association are computed separately for each two-way table. If you specify a row, a column, and a
layer factor (control variable), the Crosstabs procedure forms one panel of associated statistics
and measures for each value of the layer factor (or a combination of values for two or more control
variables). For example, if *gender *is a layer factor for a table of *married* (yes, no)
against *life* (is life exciting, routine, or dull), the results for a two-way table for the
females are computed separately from those for the males and printed as panels following one
another.

**Example.** Are customers from small companies more likely
to be profitable in sales of services (for example, training and consulting)
than those from larger companies? From a crosstabulation, you might
learn that the majority of small companies (fewer than 500 employees)
yield high service profits, while the majority of large companies
(more than 2,500 employees) yield low service profits.

**Statistics and measures of association.** Pearson chi-square,
likelihood-ratio chi-square, linear-by-linear association test, Fisher's
exact test, Yates' corrected chi-square, Pearson's *r*, Spearman's
rho, contingency coefficient, phi, Cramér's *V*, symmetric and
asymmetric lambdas, Goodman and Kruskal's tau, uncertainty coefficient,
gamma, Somers' *d*, Kendall's tau-*b*, Kendall's tau-*c*,
eta coefficient, Cohen's kappa, relative risk estimate, odds ratio,
McNemar test, Cochran's and Mantel-Haenszel statistics, and column
proportions statistics.

Crosstabs Data Considerations

**Data.** To define the categories of each table variable,
use values of a numeric or string (eight or fewer bytes) variable.
For example, for *gender*, you could code the data as 1 and 2
or as *male* and *female*.

**Assumptions.** Some statistics and measures assume ordered
categories (ordinal data) or quantitative values (interval or ratio
data), as discussed in the section on statistics. Others are valid
when the table variables have unordered categories (nominal data).
For the chi-square-based statistics (phi, Cramér's *V*, and contingency
coefficient), the data should be a random sample from a multinomial
distribution.

*Note*: Ordinal variables can be either numeric codes that
represent categories (for example, 1 = *low*, 2 = *medium*,
3 = *high*) or string values. However, the alphabetic order of
string values is assumed to reflect the true order of the categories.
For example, for a string variable with the values of *low*, *medium*, *high*,
the order of the categories is interpreted as *high*, *low*, *medium*--which
is not the correct order. In general, it is more reliable to use numeric
codes to represent ordinal data.

To Obtain Crosstabulations

This feature requires the Statistics Base option.

- From the menus choose:
- Select one or more row variables and one or more column variables.

Optionally, you can:

- Select one or more control variables.
- Click Statistics for tests and measures of association for two-way tables or subtables.
- Click Cells for observed and expected values, percentages, and residuals.
- Click Format for controlling the order of categories.

This procedure pastes CROSSTABS command syntax.