Hello all,
My problem seems simple but I can't find a way to solve it.
I want to create an new variable (index) being the sum of 6 variables : chom_i nodip_i surocc_i fmonop_i imm_i pauv_i
These variables refer to binary concepts and are coded as such : 1 = yes; 2 = no; 9 = missing data.
I want index to sum the value of the 6 variables only when 1 or 0, never when 9 so that the range of index remains between 0 and 6. When it's 9 it must add 0.
I have tried several ways but can't find a good solution..
Thanks in advance for much needed help
)
Sybille
My problem seems simple but I can't find a way to solve it.
I want to create an new variable (index) being the sum of 6 variables : chom_i nodip_i surocc_i fmonop_i imm_i pauv_i
These variables refer to binary concepts and are coded as such : 1 = yes; 2 = no; 9 = missing data.
I want index to sum the value of the 6 variables only when 1 or 0, never when 9 so that the range of index remains between 0 and 6. When it's 9 it must add 0.
I have tried several ways but can't find a good solution..
Thanks in advance for much needed help

Sybille
Comment