I have a data file in which each participant is tested many times in several blocks. The data is formatted so that each trial contains a participant id, a block number and a score. What I want to do is group the data by participant and block, then rank the scores for each group, so I can use the top 50%.
For example:
p_id, block, score
------------------
1 1 35
1 1 84
1 1 12
1 1 76
1 2 51
1 2 67
1 2 54
1 2 18
With this data I would have 2 groups. Of the first (p_id=1,block=1) the second and fourth scores would be used (score=84,score=76). Of the second group, the second and third would be used (score=67,score=54).
How would I go about doing this in SPSS?
(I'm using v16, but have the option of upgrading if necessary.)