how to sort out warning #532?

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

Posts: 1
Joined: Mon Jul 08, 2013 6:55 pm

how to sort out warning #532?

Postby suselko » Mon Jul 08, 2013 7:55 pm

I would be very grateful if you could help me with this.
I get this warning when I run my syntax:
Warning # 532
>During execution of the indicated command, one of the operands of AND or OR
>had other than a valid logical value. The valid logical values are 0, 1, and
>missing. The invalid value has been treated as a system missing value.
>Command line: 14 Current case: 1 Current splitfile group: 1

I can't find anything about this warning 532 on the net.

The syntax is as follows:

1 COMPUTE Offender=0.
2 IF P_Police=(-1 OR 1) Offender=1.
3 IF P_Youth=(-1 OR 1) Offender=1.
4 IF Primary=(10 OR 11) Offender=1.
5 IF Second1=(10 OR 11) Offender=1.
6 IF Second2=(10 OR 11) Offender=1.
7 IF Second3=(10 OR 11) Offender=1.
8 if Prob=1 Offender=1.
9 if asbo=1 Offender=1.
10 if RefSourc=(4 or 12 or 13) Offender=1.
11 if accomm=(11 or 12) Offender=1.
12 if PrevAcc=(11 or 12) Offender=1.
13 if AccomTyp=(19 or 20) Offender=1.

I can't see what is wrong with this syntax... I have a feeling it may be something to do with missing values. Any ideas?

Thanks in advance!
Posts: 56
Joined: Mon May 02, 2011 6:07 pm

Re: how to sort out warning #532?

Postby apeape » Tue Jul 09, 2013 1:37 pm

It doesn't have anything to with missing values - your use of logical operands is invalid. SPSS doesn't permit you to abbreviate syntax in that way (e.g. this is invalid: "if x = 1 or 2 y = 1"). Rather you must specify for each variable like so "if (x = 1) or (x = 2) y = 1".

Who is online

Users browsing this forum: No registered users and 1 guest