Five highest scores

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Five highest scores

Paul Jeffries-2
Dear list,
 
I have seven scores for each subject.  Scores can range from zero to 1.  I want to take the average of the five highest scores for each subject.  So I do I get SPSS to drop the two lowest scores for each subject and average the remaining scores.
 
Any help is appreciated,
Paul W. Jeffries
Department of Psychology
Washington & Jefferson College
60 South Lincoln Street
Washington, PA 15301
Email:  [hidden email]
Ph.:  724 503 1001 x3363
Fx.:   724 228 3802
Reply | Threaded
Open this post in threaded view
|

Re: Five highest scores

Bruce Weaver
Administrator
Paul Jeffries-2 wrote
Dear list,

I have seven scores for each subject.  Scores can range from zero to 1.  I want to take the average of the five highest scores for each subject.  So I do I get SPSS to drop the two lowest scores for each subject and average the remaining scores.

Any help is appreciated,
Paul W. Jeffries
Here's one way.

* Restructure from one row per person to 7 rows per person .

VARSTOCASES
  /MAKE x FROM x1 x2 x3 x4 x5 x6 x7
  /INDEX=index(7)
  /KEEP=id
  /NULL=KEEP.

* Rank the scores within ID .

RANK VARIABLES=x (A) BY id
  /RANK
  /PRINT=YES
  /TIES=MEAN.

* Drop the lowest two ranks .

select if (Rx GT 2).
exe.

* Compute the mean of the highest 5 scores .

aggregate outfile = * /
 break = ID /
 mean_5_hi = mean(x).

--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).