Date: Tue, 12 Sep 2006 10:44:58 +0200
Reply-To: Spousta Jan <JSpousta@CSAS.CZ>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Spousta Jan <JSpousta@CSAS.CZ>
Subject: Re: using ANY in select if
Content-Type: text/plain; charset="us-ascii"
This is not so easy, Bob, because ABS function does not support the cute
TO convention - you cannot write
If sum(abs(v1 to v10)) > 0 /* WRONG COMMAND !!! */.
So you must write
If sum(abs(v1), abs(v2), etc.) > 0
Or use a loop as Richard Ristow devised earlier :-(
Greetings
Jan
>If Jan's interpretation of the original question is right, you could
also add up the absolute value of each
> difference, using a SUM function, and Select If SUM > 0
>
>Bob Schacht
-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of
Bob Schacht
Sent: Tuesday, September 12, 2006 9:44 AM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: Re: using ANY in select if
>
>-----Original Message-----
>From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf
>Of Spousta Jan
>Sent: Monday, September 11, 2006 9:44 AM
>To: SPSSX-L@LISTSERV.UGA.EDU
>Subject: Re: using ANY in select if
>
>Hi Tony,
>
>You wish to select cases where at least one of the difference variables
>is not zero? Try e.g. this:
>
>Select if max(dif1 to dif10) > 0 or min(dif1 to dif10) < 0.
>
>Is this what you need?
>
>Jan
>-----Original Message-----
>From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf
>Of Baglioni, Tony
>Sent: Monday, September 11, 2006 4:31 PM
>To: SPSSX-L@LISTSERV.UGA.EDU
>Subject: using ANY in select if
>
>All,
>
>
>
>Can someone please give me an example of the use of ANY within the
>select if command? I have a list of difference variables and I want to
>select cases where the difference is not zero.
>
>
>
>TIA,
>
>Tony
>
>
>
>A. J. Baglioni, jr.
>
>Assistant Professor
>
>McIntire School of Commerce
>
>University of Virginia
>
>434 924-4961
Robert M. Schacht, Ph.D., Research Director Pacific Basin Research and
Training Center
1268 Young Street, Suite #204
Research Center, University of Hawaii
Honolulu, HI 96814
E-mail <schacht@hawaii.edu>
Phone 808-592-5904, FAX 808-592-5909