Reputation: 375
I have a SPSS file that has 600 variables and for each of them there can be 0 to 4 different missing values. I am trying to change the missing values according to this pattern:
996 -> -6
997 -> -7
998 -> -8
999 -> -9
Where 996 is "No object" , 997 is "Does not know" , 998 is "Refused", 999 is "Non declared". I would need the changed numbers to have the same labels. There are other value labels in the variables therefore i can't simply delete the labels and add the new ones.
Is there a way to either delete specific value labels or change the value using a script?
Upvotes: 3
Views: 1642
Reputation: 5417
If these labels are the same for all the variables, just use the ADD VALUE LABELS command specifying those four values. If these labels vary with the variable, somewhat more complicated code would be required, but let's not go there unless it is necessary.
Upvotes: 1
Reputation: 2929
This seems a duplicated question, which I answered myself sometime ago. Through conventional syntax I don't think it is still possible.
Well, nothing is impossible in the realms of computing. Raynald Levesque outlines a workaround solution here. And Ruben Geert van den Berg provides a python solution on his website also.
Upvotes: 0