QQQs
QQQs

Reputation: 35

How to show the numeric values of categorical labels in output using spss syntax

I was wondering whether there is a way to show the numeric values attached to the categories of a nominal variable when we create tables or frequencies in SPSS syntax.

I would like to use something similar to what the , nolab argument in stata does. It provides the numeric values of each category of the categorical variable (for example 1 for men and 0 for women).

I would like to create tables using SPSS Syntax (2-way tables or just frequencies) that show the nominal categories as well as the numeric values that SPSS has for each category. Does anybody know if this is possible with the table or frequencies command?

Upvotes: 2

Views: 2808

Answers (1)

mirirai
mirirai

Reputation: 1409

In SPSS you can choose in the settings wether label, the numerical values or both are shown in the output tables.

GUI

In the Menu choose Edit->Options and then the Output tab. There you can change the output settings under Pivot Table Labeling.

Syntax

Within Syntax Editor you can define the output settings with the "SET TNUMBERS" command.

SET TNUMBERS LABELS. /* Only Labels are shown in the output tables.
SET TNUMBERS VALUES. /* Only Values are shown in the output tables.
SET TNUMBERS BOTH.   /* Values and Labels are shown in the output tables.

For more information see: SPSS Command Syntax Reference

Upvotes: 2

Related Questions