SPSS 中的多重响应
Multiple responses in SPSS
我有多个响应问题,其中包含 5 个类别(值)。我想让受访者只回答一个类别。
例如,
回答类别不是 2、3、4、5 的受访者。
我只想要 A 提及,他们都单独检查了 A 类。我需要数一数。
请帮忙。
以下解决方案假设数据有 5 个二分变量 - 每个多响应类别一个。
* creating some sample data to demonstrate on.
data list list/cat1 to cat5.
begin data
1 0 0 0 1
0 1 1 0 0
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 0 1
1 0 0 0 0
1 1 1 0 0
end data.
* now checking in which cases only category 1 was chosen.
compute NumCats=sum(cat1 to cat5).
if cat1=1 and NumCats=1 onlyCat1=1.
execute.
* if instead you wish to do the same check for each of the 5 categories,
use `do repeat` this way.
do repeat cat=cat1 to cat5/only=only1 to only5.
compute only=(cat=1 and NumCats=1).
end repeat.
execute.
但是放弃 EXECUTE 命令。在这种情况下,它们只会导致无用的数据传递,除了立即更新数据编辑器(而不是在下一次数据传递时更新)。
我有多个响应问题,其中包含 5 个类别(值)。我想让受访者只回答一个类别。
例如,
回答类别不是 2、3、4、5 的受访者。
以下解决方案假设数据有 5 个二分变量 - 每个多响应类别一个。
* creating some sample data to demonstrate on.
data list list/cat1 to cat5.
begin data
1 0 0 0 1
0 1 1 0 0
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 0 1
1 0 0 0 0
1 1 1 0 0
end data.
* now checking in which cases only category 1 was chosen.
compute NumCats=sum(cat1 to cat5).
if cat1=1 and NumCats=1 onlyCat1=1.
execute.
* if instead you wish to do the same check for each of the 5 categories,
use `do repeat` this way.
do repeat cat=cat1 to cat5/only=only1 to only5.
compute only=(cat=1 and NumCats=1).
end repeat.
execute.
但是放弃 EXECUTE 命令。在这种情况下,它们只会导致无用的数据传递,除了立即更新数据编辑器(而不是在下一次数据传递时更新)。