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 (July 2006)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 3 Jul 2006 07:28:14 -0500
Reply-To:     "Peck, Jon" <>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         "Peck, Jon" <>
Subject:      Re: Stacking Variables Into a New Variable
Comments: To:
Content-Type: text/plain; charset="iso-8859-1"

Transformation functions such as max, min, sum, and mean are smart enough to omit missing values. Otherwise they would be pretty much useless. That is why they have the optional form function.count(x,y,...) which produces a missing value result if there are not at least count nonmissing values in the arguments.

Tricky, indeed.

Regards, Jon Peck SPSS

-----Original Message----- From: SPSSX(r) Discussion on behalf of Antoon Smulders Sent: Mon 7/3/2006 3:14 AM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Re: [SPSSX-L] Stacking Variables Into a New Variable -----Oorspronkelijk bericht----- Van: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] Namens Richard Ristow Verzonden: vrijdag 30 juni 2006 0:13 Aan: SPSSX-L@LISTSERV.UGA.EDU Onderwerp: Re: Stacking Vartibles Into a New Variable

At 04:54 PM 6/29/2006, Gene Maguin wrote:

>This should do it. > >If (class eq 1) v44=v11. >If (class eq 2) v44=v21. >If (class eq 3) v44=v34.

It should, indeed. I'd say, that's the way to do it.

But, just to be 'cute', there's

COMPUTE V44 = MAX(v11,v21,v34).

Now, if a value is filled in that shouldn't be, say v34 has a value for a class-1 respondent, Gene's code handles it about as reasonably as possible, and mine won't.

But, hey, coding tricks are fun.

-Onward, Richard

Well, SPSS itself is tricky sometimes too! Richard made me realize that, if it is really important to know which variable has the highest value, you can NOT use the MAX function. How does SPSS "know" that missing values are smaller than non missings?


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