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 12:08:32 -0500
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         John McConnell <jmcconnell@APPLIED-INSIGHTS.CO.UK>
Subject:      Re: Compound IF syntax
Comments: To:
Content-Type: text/plain; charset=us-ascii


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