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 (September 2005)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 9 Sep 2005 20:49:13 -0400
Reply-To:     Richard Ristow <wrristow@mindspring.com>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Richard Ristow <wrristow@mindspring.com>
Subject:      Re: Combining binary columns into a single column
Comments: To: Margaret MacDougall <margmacd@talk21.com>
In-Reply-To:  <20050909085313.66251.qmail@web86607.mail.ukl.yahoo.com>
Content-Type: text/plain; charset="us-ascii"; format=flowed

(I've returned to the original subject line so my E-mail program will 'thread' the exchange correctly.)

At 04:53 AM 9/9/2005, Margaret MacDougall wrote:

>Yesterday, I posted the query, [how to] code the pairs forthcoming >from two >'binary columns' into a single column after the following fashion: > >0,0-->1 >0,1-->2 >1,0-->3 >1,1-->4 >1,blank-->blank >blank,1-->blank >blank,blank-->blank

It looks like everybody understood what you wanted to do. Nevertheless, it's better not to speak of a 'blank' value for a numeric variable. Numeric quantities cannot be 'blank'. The value most analogous is "system-missing", SYSMIS for short, which is probably what your "blanks" are.

>I noticed that I could define a function in SPSS using the Compute >option from the transorm menu which solves my problem. Perhaps other >users will find this useful and so I offer the solution below: > >DEFINE THE FUNCTION 'COMPOSITE' WITH VALUES GIVEN BY: >COMPOSITE(c1CELL,c2CELL)=2^c1CELL*3^c2CELL, > >where c1CELL and c2CELL are corresponding entries in the first and >second column, respectively. [THIS MAPS THE ORIGINAL PAIRS TO 1,3,2,6, >RATHER THAN 1,2,3,4 BUT THIS GIVES A 4-VALUED COLUMN WHICH SUFFICES >FOR MY NEEDS.]

Good. But if you wanted the exact coding you specified, then try (though this is untested),

COMPOSITE(c1CELL,c2CELL)=2*c1CELL + c2CELL + 1.


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