Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Macos SPSS:如何根据其他case_变量的值更改case_I-变量_j_Macos_Spss - Fatal编程技术网

Macos SPSS:如何根据其他case_变量的值更改case_I-变量_j

Macos SPSS:如何根据其他case_变量的值更改case_I-变量_j,macos,spss,Macos,Spss,如果SPSS只有案例和变量(行和列)的索引,并且案例的值表示为Val(i.j),那么我希望运行如下脚本 for loop = 10 to 100 If Val(loop+10,6)=0 then Val(loop, 10)= Val(loop+3, 8) 'or something like this end if next loop 我是SPSS新手,注意到您可以移动列,然后使用repeat和compute。 但是compute会影响整个专栏,我想更改循环遍历所有案例的选定案例(并

如果SPSS只有案例和变量(行和列)的索引,并且案例的值表示为Val(i.j),那么我希望运行如下脚本

for loop = 10 to 100 
 If Val(loop+10,6)=0 then
  Val(loop, 10)= Val(loop+3, 8) 'or something like this
 end if
next loop
我是SPSS新手,注意到您可以移动列,然后使用repeat和compute。
但是compute会影响整个专栏,我想更改循环遍历所有案例的选定案例(并使用IF(case vales=true的组合),然后……)
VBA在Excel中也有类似的功能。似乎VBA在SPSs for OSX中不可用(如果可用,则无法定位)

我不明白您想做什么,但SPSs有用于记录索引的
$casenum
变量;所以你可以使用
if$casenum=[some condition][some transformation]
如果你从真实数据中添加了一个更具体的例子(你可以通过编辑你的文章来做到这一点),我们可以提供一个解决方案并解释它,这样你就可以理解这个原理并概括它。