Differences between revisions 1 and 2
Revision 1 as of 2023-01-14 22:08:15
Size: 310
Comment:
Revision 2 as of 2023-06-10 13:50:29
Size: 4269
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:

The '''`CROSSTABS`''' command creates a cross-tabulation.
Line 11: Line 13:
To create a two-way crosstabulation, try: {{{
crosstabs /table=foo by bar.
}}}

To create a series of tables with `foo` as the row-wise variable in each, try:
Line 14: Line 20:
crosstabs /table=FOO by BAR /table=HAM by SPAM EGGS. crosstabs /table=foo by ham spam eggs.
Line 17: Line 23:
This will create three tables: To create an N-dimensional table, try:
Line 19: Line 25:
 1. `FOO` by `BAR`
 2. `HAM` by `SPAM`
 3. `HAM` by `EGGS`
{{{
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.

----



== See also ==

[[https://www.gnu.org/software/pspp/manual/html_node/CROSSTABS.html|PSPP manual for CROSSTABS]]

SPSS Crosstabs

The CROSSTABS command creates a cross-tabulation.


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.


See also

PSPP manual for CROSSTABS


CategoryRicottone

SPSS/Crosstabs (last edited 2023-06-11 20:53:05 by DominicRicottone)