Reputation: 195
I have a SPSS database with several variables and scores for each one depending on the case row. I'd like to shape this to Excel format, so there will be one column called variable and below just the name of every SPSS variable (before in several columns) and next to it a column called scores and the respective score for every variable. Don't know how to do it.
Visual example:
SPSS format
Country | Variable 1 | Variable 2 | Variable 3...
USA | 80 | 45 | 34...
Excel format
Country | Variable | Score
USA | Variable 1 | 80
USA | Variable 2 | 45
USA | Variable 3 | 34
Upvotes: 1
Views: 112
Reputation: 5089
The command you are looking for is VARSTOCASES
, this reshapes multiple columns into one row. See the help for the full options, but for your example in a nutshell it would be
VARSTOCASES /MAKE Score FROM Variable1 TO Variable3 /INDEX Variable (Score).
Upvotes: 1