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 (February 2005)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 25 Feb 2005 15:54:53 +0100
Reply-To:     Spousta Jan <>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Spousta Jan <>
Subject:      Re: compute problem
Comments: To: Paul Mcgeoghan <mcgeoghan@CARDIFF.AC.UK>
Content-Type: text/plain; charset="iso-8859-2"

Hi Paul,

Aggregate the data by subjects computing the average sex in each combination. Then recode the average sex into 1-2-3 and merge the aggregated file back to the original file as a "keyed table" using subjects as keys.

Much more interesting will be probably to test whether the result was due to a chance or whether it is a true property of the gender, I think :-)

Wishing a nice weekend to you and to all


-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]On Behalf Of Paul Mcgeoghan Sent: Friday, February 25, 2005 12:54 PM To: SPSSX-L@LISTSERV.UGA.EDU Subject: compute problem


I have the following problem: There are 20 variables Subject1 to Subject20 with values 1 if they chose the subject and 0 if they didn't. I want to compute a new variable where if males and females have chosen the same combination of subjects, the value is 1; if only males choose a particular combination of subjects, it is 2, if only females choose a particular combination of subjects, it is 3.

So if I have for example 3 variables: Subject1 to Subject3 with data: Row Sub1 Sub2 Sub3 Gender NewV 1 1 1 1 1 1 2 1 1 1 2 1 3 1 0 0 1 1 4 1 0 0 2 1 5 1 0 1 1 2 6 0 0 1 2 3

In the last row of data (row 6), only females chose that particular combination whereas in row 5, only males chose that particular subject combination.

What is the easiest way of doing this in SPSS?


================== Paul McGeoghan, Application support specialist (Statistics and Databases), University Systems Group (USG), Information Services, Cardiff University. Tel. 02920 (875035).

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