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 10:14:28 +0200
Reply-To:     a.smulders@beke.nl
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Antoon Smulders <a.smulders@beke.nl>
Subject:      Re: Stacking Variables Into a New Variable
Comments: To: Richard Ristow <wrristow@mindspring.com>
In-Reply-To:  <FABE7BF4C8A9B647A083DCEB99A792CF2075BB@beke01.beke.local>
Content-Type: text/plain; charset="us-ascii"

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

Antoon


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