Restructuring data

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

amalkis
Posts: 2
Joined: Mon Feb 01, 2016 9:56 pm

Restructuring data

Postby amalkis » Tue Feb 02, 2016 2:33 pm

I am using SPSS 19 on a Windows 7 PC.

I have a data set where there are multiple rows for each case and each row contains a separate variable and its data. I want to turn this into a data set where there is one row per case with multiple variables and data. I am a bit rusty on SPSS and am not sure how to accomplish this. Any advice welcome.

Currently:

case 1 Varname 1 Data 11
case 1 Varname 2 Data 12
case 1 Varname 3 Data 13
case 2 Varname 1 Data 21
case 2 Varname 2 Data 22
case 2 Varname 3 Data 23

Goal:

Case 1 Data 11 Data 12 Data 13
Case 2 Data 21 Data 22 Data 23



Thanks!
amalkis
Posts: 2
Joined: Mon Feb 01, 2016 9:56 pm

Re: Restructuring data

Postby amalkis » Tue Feb 02, 2016 3:27 pm

Well, after some more thought I found a solution. I sorted everything by case number and variable name so all the data were in the same order for each case. then I deleted the variable name field leaving only the case number and data vales. Then I restructured by Case number. Then I used my list of variables to put the correct variable name in the variable definition fields. So I think I am good to go.

Who is online

Users browsing this forum: No registered users and 1 guest

cron