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 2008)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 19 Dec 2008 12:51:54 -0600
Reply-To:   Ariel Barak <abarakabarak@gmail.com>
Sender:   "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:   Ariel Barak <abarakabarak@gmail.com>
Subject:   Re: simple query
Comments:   To: Khaleel Hussaini <khaleel.hussaini@gmail.com>
In-Reply-To:   <e816252b0812191031of683325jf2084d2b8524e5b2@mail.gmail.com>
Content-Type:   text/plain; charset=ISO-8859-1

Hi Khaleel,

The code below works properly as long as there are always only 3 variables.

HTH, Ariel Barak

DATA LIST LIST /ID (F8) A (F8) B (F8) C (F8). BEGIN DATA 1 65 50 78 2 50 65 80 3 70 78 55 4 60 60 65 END DATA.

DATASET NAME Original.

COMPUTE Top2=SUM(A TO C) - MIN(A TO C). EXE.

On Fri, Dec 19, 2008 at 12:31 PM, Khaleel Hussaini < khaleel.hussaini@gmail.com> wrote:

> Hello Listers, > I am having trouble with a simple query. I have three variables A B & C. > These are quantitative scores ranging 0 to 100. I want to pick two top > scores and sum them. For e.g. > A B C NewVar > 65 50 78 65+78 > 50 65 80 65 + 80 > 70 78 55 70 + 78 > 60 60 65 60 +65 > etc. > Sorry for posting a silly query. > > ===================== > 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 >

===================== 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