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 (May 2007)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 15 May 2007 19:19:11 -0700
Reply-To:     besheer mohamed <besheermohamed@yahoo.com>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         besheer mohamed <besheermohamed@yahoo.com>
Subject:      Re: recode from a variable?
Content-Type: text/plain; charset=ascii

It seems that Error_Code made my question unclear. I don't necessarily want to exclude it from analysis. I'm not saying it's missing. Error_Code is a variable name.

Lets just call them variable1 and variable2 (both numeric). Can you use RECODE to set variable1 equal to variable 2 only if variable1 is currently 0? You could just use an IF statement instead, but there are some advantages to recode that I'd like to be able to maintain. I wouldn't be all that surprised if RECODE couldn't do what I wanted, but thought I would ask anyway.

Thanks, Besheer

----- Original Message ---- From: Art Kendall <Arthur.Kendall@verizon.net> To: SPSSX-L@LISTSERV.UGA.EDU Sent: Tuesday, May 15, 2007 8:17:48 PM Subject: Re: recode from a variable?

it would be better to do #1 or #2

#1 Missing values comp_decision (0).

#2 What Melissa said.

This is a user missing situation. The value is to be treated as missing because the user says so not because the program cannot read the input nor because the program is incapable of performing as instructed. The system is not saying the value should be treated as missing the user is.

Art Kendall Social Research Consultants

Marks, Jim wrote: > Is this what you want? > > RECODE comp_decision (0 = SYSMIS). > > This will change the value to system missing-- I assume comp_decision is > a numeric variable? > > --jim > > -----Original Message----- > From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of > Melissa Ives > Sent: Tuesday, May 15, 2007 4:06 PM > To: SPSSX-L@LISTSERV.UGA.EDU > Subject: Re: recode from a variable? > > Seems to me you should use a numeric code (-9) instead of a text string > ('Error_Code'), then assign the numeric code to missing if you want it > excluded from analyses. > > Melissa > > -----Original Message----- > From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of > besheer mohamed > Sent: Tuesday, May 15, 2007 4:03 PM > To: SPSSX-L@LISTSERV.UGA.EDU > Subject: [SPSSX-L] recode from a variable? > > Is it possible in SPSS to recode a variable into a specific value. For > example something like the following (which does not work but I think > gets at conceptually what I'm trying to do. > > recode Comp_Decision (0 = Error_Code). > > In theory I'd like to see Comp_Decision set to Error_Code but only if > Comp_Decision is currently 0. > I can think of a number of other ways to get this done, but wanted to > know if it can be done with recode. > > Thanks, > Besheer > > > 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. > > >


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