Multiple variables into one variable where multiple variables could be active

15 pts.
Tags:
Multiple
recode
syntax
I am attempting to recode about eight variables into one variable. As it stands I have a syntax that is as follows: IF VAR1=1 NewVar=1. IF VAR2=1 NewVar=2. IF VAR3=1 NewVar=3. IF VAR4=1 NewVar=4. IF VAR5=1 NewVar=5. IF VAR6=1 NewVar=6. IF VAR7=1 NewVar=7. IF VAR8=1 NewVar=8. ADD VALUE LABELS NewVar 1 '1Label' 2 '2Label' 3 '3Label' 4 '4Label' 5 '5Label' 6 '6Label' 7 '7Label' 8 '8Label'. However, this does not account for multiple active variables - each variable is a 1 or 0 answer, but each variable could have a 1 in, which is where I'm struggling as I am after a line of code that suggests if there are multiple 1s between the 8 variables that it would recode into a 9th variable called 'Mixed' Any help would be greatly appreciated

Software/Hardware used:
SPSS 20

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • BigKat
    so if you had: 10000000, you want 1 0 0 0 0 0 0 0 plus an additional "mixed" variable of 0 10001000, you want 1 0 0 0 1 0 0 0 plus an additional "mixed" variable of 1 and in what language do you want this in?
    8,710 pointsBadges:
    report
  • carlosdl
    An example would also help to understand the problem.
    78,795 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: