Hi,

I have a number of variables coded 1/0 which indicate whether a respondent was involved in sub-categories of local government. I now want to combine these into a smaller number of categories using the compute command. Basically I want to say if any of a number of variables=1 then the new variable should equal 1, otherwise it should equal 0. I wrote the syntax below to do this, but keep getting back a bunch of missing data.

Can anybody help me?

The syntax I tried was:

DO IF Q8_RC_pc_sc EQ 1.

COMPUTE Q8_inv_chiefg=1.

ELSE IF Q8_RC_kapr EQ 1.

COMPUTE Q8_inv_chiefg=1.

ELSE IF Q8_RC_subc EQ 1.

COMPUTE Q8_inv_chiefg=1.

ELSE IF Q8_RC_lcourt EQ 1.

COMPUTE Q8_inv_chiefg=1.

ELSE IF Q8_RC_cc EQ 1.

COMPUTE Q8_inv_chiefg=1.

ELSE.

COMPUTE Q8_inv_chiefg=0.

END IF.