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 (December 2011)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 22 Dec 2011 14:54:04 -0500
Reply-To:     Colin Valdiserri <cvaldiserri@idg-consulting.com>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Colin Valdiserri <cvaldiserri@idg-consulting.com>
Subject:      Re: Using String Variables in Recode Syntax
Comments: To: "Poes, Matthew Joseph" <mpoes@uillinois.edu>
In-Reply-To:  <139EBE2EF1603B48A3BC8F89B34434D402136A96@chimbx3.ad.uillinois.edu>
Content-Type: multipart/alternative;

Thank you very much!

Colin M. Valdiserri

Co-Founder & CEO

Informed Decisions Group, Inc.

8854 Jordan Court | North Ridgeville, Ohio | 44039 P: 440.935.5414 F: 440.353.0621

cvaldiserri@idg-consulting.com <http://us.mc8.mail.yahoo.com/mc/compose?to=cvaldiserri@idg-consulting.com> www.idg-consulting.com <http://www.idg-consulting.com/>

Follow us on LinkedIn <http://www.linkedin.com/company/informed-decisions-group-inc/products>

The information and attachments contained in this e-mail message is intended for the use of the recipient(s) named above and is privileged and confidential. If you are not the intended recipient, you are formally notified that you have received this message in error and that any review, dissemination, distribution, or copying of the message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the original message.

From: Poes, Matthew Joseph [mailto:mpoes@uillinois.edu] Sent: Thursday, December 22, 2011 12:51 PM To: Colin Valdiserri; SPSSX-L@LISTSERV.UGA.EDU Subject: RE: Using String Variables in Recode Syntax

Put quotes around the string values:

If (cell=21 or cell=22 or cell=23 or cell=24) and (segmentm="me" or segmentm="mg") and (segmentp="p1" or segmentp="p2") segment=2.

Matthew J Poes

Research Data Specialist

Center for Prevention Research and Development

University of Illinois

From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Colin Valdiserri Sent: Thursday, December 22, 2011 11:43 AM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Using String Variables in Recode Syntax

Hello Everyone,

I am computing a segment variable consisting of two segments. The code is as follows.

Compute segment=0.

If (cell=1 or cell=2 or cell=3 or cell=4 or cell=5 or cell=6 or cell=7 or cell=8 or cell=9 or cell=10 or cell=11 or cell=12 or cell=13 or cell=14 or cell=15 or cell=16 or cell=17 or cell=18 or cell=19 or cell=20) and (segmentm=mc or segmentm=md) and segmentp=p3 and segmentc=cy segment=1.

If (cell=21 or cell=22 or cell=23 or cell=24) and (segmentm=me or segmentm=mg) and (segmentp=p1 or segmentp=p2) segment=2.

The problem I'm running into is that SPSS won't let me use string variables for this. Is there any way I can carry out this syntax with the string variables or a workaround for using string variables that anyone may know?

Thank you in advance for all of your help,

Colin

Colin M. Valdiserri

Informed Decisions Group, Inc.

8854 Jordan Court | North Ridgeville, Ohio | 44039 P: 440.935.5414 F: 440.353.0621

cvaldiserri@idg-consulting.com <http://us.mc8.mail.yahoo.com/mc/compose?to=cvaldiserri@idg-consulting.com> www.idg-consulting.com <http://www.idg-consulting.com/>

Follow us on LinkedIn <http://www.linkedin.com/company/informed-decisions-group-inc/products>

The information and attachments contained in this e-mail message is intended for the use of the recipient(s) named above and is privileged and confidential. If you are not the intended recipient, you are formally notified that you have received this message in error and that any review, dissemination, distribution, or copying of the message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the original message.


[text/html]


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