LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 2009)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 21 Dec 2009 12:32:48 -0800
Reply-To:   Bruce Weaver <bruce.weaver@hotmail.com>
Sender:   "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:   Bruce Weaver <bruce.weaver@hotmail.com>
Subject:   Re: Five highest scores
In-Reply-To:   <CE5B8B2DF2558948A4A0791E2F2F9A4401C76D10CE01@exch-mstore.washjeff.edu>
Content-Type:   text/plain; charset=us-ascii

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."

NOTE: My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. -- View this message in context: http://old.nabble.com/Five-highest-scores-tp26878919p26879598.html Sent from the SPSSX Discussion mailing list archive at Nabble.com.

===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


Back to: Top of message | Previous page | Main SPSSX-L page