Thanks Melissa, that's it
Will
On 4/9/2009 10:13:39 AM, Melissa Ives (
[hidden email]) wrote:
> I believe you want this to be a DO IF.
> TEMPORARY only works on the next data pass and would not work with this
> kind of compute.
> Melissa
>
> DO IF (ChapterMemberRecode = 2).
> Compute loyalcx=5.
> IF ((q8br=1 or q8br=2) or (q10r=1 or q10r=2) or (q12r=1 or q12r=2))
> loyalcx=4.
> IF ((q8br=1 or q8br=2 or q8br=3 or q8br=4) and ((q10r=3 or q10r=4)
> or (q12r=3 or q12r=4 or q12r=5))) loyalcx=3.
> IF ((q8br=4 or q8br=5) and (q10r=4 or q10r=5) and (q12r=4 or q12r=5))
> loyalcx=2.
> IF ((q8br=4 or q8br=5) and (q10r=5) and (q12r=5)) loyalcx=1.
> END IF
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:
[hidden email]] On Behalf Of
> Statmanz
> Sent: Thursday, April 09, 2009 6:52 AM
> To:
[hidden email]
> Subject: [SPSSX-L] Temporary & IF Statements
>
> Didn't this construct work at one time or another?
>
> Temp.
> Select If(ChapterMemberRecode = 2).
> Compute loyalcx=5.
> IF ((q8br=1 or q8br=2) or (q10r=1 or q10r=2) or (q12r=1 or q12r=2))
loyalcx=4.
> IF ((q8br=1 or q8br=2 or q8br=3 or q8br=4) and ((q10r=3 or q10r=4) or
> (q12r=3 or q12r=4 or q12r=5))) loyalcx=3.
> IF ((q8br=4 or q8br=5) and (q10r=4 or q10r=5) and (q12r=4 or q12r=5))
loyalcx=2.
> IF
=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD