Why does SPSS exclude 0-values after recoding with IF (ANY 1, var) ? Frequency tables only showing 1 and missing.

RSmit

New Member
#1
Hi everyone!

There is something strange going on with SPSS after recoding/making a new variable. I hope someone can help me!

I want to make a new variable, say I would call it NEWVARIABLE.
Then I want NEWVARIABLE to be 1, if ANY of the following variables has 1 (yes): D105A, D105B, D105C, D105D, D105E, D105F, D105G, D105H, D105I, D105J, D110A, D110B, D110D). To be clear. If person 1 says YES (1) on variable D105A, NEWVARIABLE would have to return 1.
So we wrote a synthax with the following code:
IF (ANY (1, D105A, D105B, D105C, D105D, D105E, D105F, D105G, D105H, D105I, D105J, D110A, D110B, D110D)) NEWVARIABLE=1.
According to SPSS, NEWVARIABLE would return 0 if all variables have values other than 1. This is exactly what we want.

But then we run a frequencies table and this table is only showing values for 1 and missing.
It seems like all values with 0 are merged with the missing values...
(adding some images to make it clear)

Does someknow why this happens and what we can do about it?

Thanks a lot!!
 

Attachments