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 (July 2006)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sat, 22 Jul 2006 13:05:00 -0500
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Jim Moffitt <>
Subject:      Re: Compound IF syntax
Comments: To:
In-Reply-To:  <>
Content-Type: text/plain; charset="us-ascii"

John: Your code seems to work just fine. Thanks so much for your help.

-----Original Message----- From: John McConnell [] Sent: Saturday, July 22, 2006 12:09 PM To: SPSSX-L@LISTSERV.UGA.EDU; Moffitt, James (West) Subject: Re: Compound IF syntax


I can't test this at the moment but it sounds like a job for COUNT. Something like

COUNT N1S=Q1 to Q26 (1). COUNT N0S=Q1 to Q26 (0). IF N1S EQ 0 AND N0S GE 1 SAM=0.



John McConnell Applied Insights

---------- Original Message ---------------------------------- From: Jim Moffitt <> Reply-To: Date: Sat, 22 Jul 2006 10:39:00 -0500

>I have 6 contiguous variables named q1-q26. > >For all 200 of my cases all twenty-six of those variables contain >either a system missing dot, a 1, or a zero. > >I have another variable named Sam. > >For all 200 of my cases Sam currently contains either a system missing >dot or a 1. > >How do I write a syntax line that says for every case in which none of >the values in any of the twenty-six contiguous variables are 1 and any >of the values in those twenty-six contiguous variables are zero, set >the value of Sam to 0? > >Thanks for your help.

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