=========================================================================
Date: Sat, 22 Jul 2006 12:08:32 -0500
Reply-To: jmcconnell@Applied-insights.co.uk
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: John McConnell <jmcconnell@APPLIED-INSIGHTS.CO.UK>
Subject: Re: Compound IF syntax
Content-Type: text/plain; charset=us-ascii
Jim,
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.
hth
John
John McConnell
Applied Insights
---------- Original Message ----------------------------------
From: Jim Moffitt <james.moffitt@thomson.com>
Reply-To: james.moffitt@thomson.com
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.
|