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 (January 2008)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 31 Jan 2008 09:00:15 -0600
Reply-To:   Melissa Ives <mives@chestnut.org>
Sender:   "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:   Melissa Ives <mives@chestnut.org>
Subject:   Re: Recoding multiple variables into one new variable
Comments:   To: Steve Runfeldt <steve@schwartzresearch.com>
Content-Type:   text/plain; charset="US-ASCII"

I would suggest one possible change to Steve's option:

COMPUTE new3_1=MAX(q3_1a,q3_1b,q3_1c,q3_1d).

That is the addition of .1 which would require only one valid response to any of the 4 variables--the rest could be missing. Of course this only works correctly if the assumption of only one response per case is true.

COMPUTE new3_1=MAX.1(q3_1a,q3_1b,q3_1c,q3_1d).

Melissa

-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Steve Runfeldt Sent: Thursday, January 31, 2008 8:56 AM To: SPSSX-L@LISTSERV.UGA.EDU Subject: [SPSSX-L] Recoding multiple variables into one new variable Importance: Low

Date: Wed, 30 Jan 2008 11:11:55 -0500 From: Deepa Bhat <deepa_bhat@jsi.com> Subject: Recoding multiple variables into one new variable

Hi everyone,

I have a database in which the data entry staff entered the responses to one question in four different columns. I would like to combine it all into one column. The syntax I have so far is the following:

RECODE q3_1a (1=1) (2=2) (99=99) (SYSMIS=SYSMIS) INTO new3_1 . VARIABLE LABELS new3_1 'Clean table or tray'. EXECUTE .

SPSS won't let me recode another variable (q3_1b q3_1c q3_1d) into new3_1. I don't have to worry about any response overriding another one because each response is affiliated with a different person.

I am trying to avoid doing frequencies of each and tallying it up the total by hand. Is there a syntax that will allow me to recode multiple variables into one variable?

Thanks so much, Deepa *************************************************************

Deepa,

I believe that another solution might be the following:

COMPUTE new3_1=MAX(q3_1a,q3_1b,q3_1c,q3_1d).

This should take the highest value for each case and put it into the new var. It should skip the system missing cases. If you are using 9s or 99s to indicate missing values, you may need to recode these in the original variables to either sysmis or 0 first.

This is what I would have done. I agree with ViAnn, that, if all you want is simple frequencies, then Tables or CTables is your best bet. But I have rarely just wanted frequency counts of data. Most of the time descriptive stats are just a prelude to something more sophisticated. If you are going to do anything with that data, you are going to want them all consolidated.

Steve

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

PRIVILEGED AND CONFIDENTIAL INFORMATION This transmittal and any attachments may contain PRIVILEGED AND CONFIDENTIAL information and is intended only for the use of the addressee. If you are not the designated recipient, or an employee or agent authorized to deliver such transmittals to the designated recipient, you are hereby notified that any dissemination, copying or publication of this transmittal is strictly prohibited. If you have received this transmittal in error, please notify us immediately by replying to the sender and delete this copy from your system. You may also call us at (309) 827-6026 for assistance.

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