Example of Cases to Variables
In this example, test scores are recorded twice for each subject—before and after a treatment.
id | scor | time |
---|---|---|
1 | 1014 | bef |
1 | 864 | aft |
2 | 684 | bef |
2 | 636 | aft |
You want to do a paired-samples t test. Your data structure is case groups, but you don't have the repeated measures for the paired variables that the procedure requires. Select Restructure selected cases into variables in the Restructure Data Wizard, use id to identify the row groups in the current data, and use time to create the variable group in the new file.
id | aft | bef |
---|---|---|
1 | 864 | 1014 |
2 | 636 | 684 |
When you run the paired-samples t test, you can now use bef and aft as the variable pair.