如何使用 spss 语法在输出中显示分类标签的数值

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

我想知道当我们在 SPSS 语法中创建 table 或频率时,是否有一种方法可以显示附加到名义变量类别的数值。

我想使用类似于 stata 中的 , nolab 参数的功能。它提供分类变量每个类别的数值(例如,男性为 1,女性为 0)。

我想使用 SPSS 语法(2 向 tables 或仅频率)创建 tables,以显示标称类别以及 SPSS 对每个类别的数值.有人知道 table 或频率命令是否可行吗?

在 SPSS 中,您可以在设置中选择标签、数值或两者都显示在输出表中。

图形界面

在菜单中选择 Edit->Options,然后选择 Output tab。您可以在 Pivot Table Labeling.

下更改输出设置

语法

在语法编辑器中,您可以使用 "SET TNUMBERS" 命令定义输出设置。

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.

有关详细信息,请参阅:SPSS Command Syntax Reference