Search code examples
spss

How to combine info from multiple variables into one in SPSS?


I have problem with this basic task. I need to combine info from multiple variables into one. I know how to do it in R, but unfortunately I have to it in SPSS and it drives me crazy.

I know it is basic, but I would really appreciate if you could help me with this one.

My dataset looks like this:

Russian  German Chinese
Yes       No     No
Yes       No     No
No        Yes    No
n.v.t.    n.v.t  n.v.t.
No        No     Yes

That is how it should look like: Russian = 1, German = 2, Chinese = 3.

Nationality
1
1
2
-
3

Solution

  • The example is easily solved like this:

    if Russian="Yes" Nationality=1.
    if German="Yes" Nationality=2.
    if Chinese="Yes" Nationality=3.
    exe.
    

    If the problem is more complex than that please edit your post and explain what other problems need to be solved, and I can add to the solution accordingly.