我对SPSS很新,我需要计算测试中发生的某些错误的数量(Stroop测试)。有三种变量:
每种类型存在80次,例如theCongruencies_1到theongruencies_80。 我想计算当thecongruencies_x具有值' I'时,在theKordKeys_x和thePressedKeys_x中有多少次相同的值。
示例:theCongruencies_42 ='我' theWordKeys_42 = 88 thePressedKeys_42 = 88
所以我需要在我的SPSS代码中做这样的事情:
COMPUTE InhibErrs = COUNT( IF( theCongruencies_1 to theCongruencies_80 EQ 'I' AND theWordkeys_1 to theWordkeys_80 EQ thePressedKeys_1 to thePressedKeys_80)). execute.
非常感谢 Deego
答案 0 :(得分:0)
试试这个:
compute countVar=0.
do repeat theCongruencies=theCongruencies_1 to theCongruencies_80
/theWordkeys=theWordkeys_1 to theWordkeys_80
/thePressedKeys=thePressedKeys_1 to thePressedKeys_80.
compute countVar=sum(countVar, (theCongruencies="I" and theWordkeys=thePressedKeys)).
end repeat.
exe.