|Date: ||Mon, 21 Dec 2009 12:32:48 -0800|
|Reply-To: ||Bruce Weaver <email@example.com>|
|Sender: ||"SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>|
|From: ||Bruce Weaver <firstname.lastname@example.org>|
|Subject: ||Re: Five highest scores|
|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 .
/MAKE x FROM x1 x2 x3 x4 x5 x6 x7
* Rank the scores within ID .
RANK VARIABLES=x (A) BY id
* Drop the lowest two ranks .
select if (Rx GT 2).
* Compute the mean of the highest 5 scores .
aggregate outfile = * /
break = ID /
mean_5_hi = mean(x).
"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
For a list of commands to manage subscriptions, send the command