Libin Xu
select if (missing(var1) + missing(var2) + missing(var3)) eq 3.
save outfile "newfile.sav".
will probably do what you want. MISSING(var) is a logical function
which returns the numerical values of '1' and '0' to represent
'true' and 'false', and you can do normal arithmetic with these
values.
You might want to check the other functions as well. A complete
list is given in the online help on the COMPUTE statement.
Unfortunately, I wasn't able to find documentation on the
functions anywhere in the printed manuals, which I consider quite
deficient, because the online help is not always optimal. If
anyone knows where to look, please tell me...
Regards, MQ
--
--------------------------------------------------------------------
Markus Quandt qua...@wiso.Uni-Koeln.DE
Universitaet zu Koeln
University of Cologne, Germany
You'll find documentation on the MISSING as well as most other functions
for numeric, string and date variables in the "Universals" section at
the beginning of the SPSS Syntax Reference Guide appropriate for your
version of SPSS. MISSING is described along with VALUE, SYSMIS, NMISS,
and NVALID in a section called "Missing Value Functions" (e.g. on pages
59-60 of the 6.1 SRG, the only version I have handy here).
I hope this helps,
Ed Tverdek
Ed Tverdek
* The side discussion involving SYSMIS(var1)+Sysmis(var2)...+
is simply too confusing for my simple mind ;-)
The little adage about forests and trees and hammers and
finger-nails comes to mind!
NN
Libin Xu wrote in message <3593F44F...@pgcps.org>...
>Dear Spssx-lers,
> I wonder if anyone can help me with this problem. I want to
>delete some cases when the values of all three variables are missing. In
>SAS, you can use the command like
>if var1=missing and var2=missing and var3=missing then delete. what
>should I do with SPSS for Windows? I looked at an old menu which has
>select if missing(var). But it won't work with a list of variables.
> Thank you for your assistance.
>
>Libin Xu
Ed Tverdek from SPSS sent me a note regarding my question on where
to find documentation for command syntax (there's a special
manual for that!). On that occasion I reread my own posting and
noticed that I wrote obvious nonsense.
Of course, the select command should be:
select if (missing(var1) + missing(var2) + missing(var3)) ne 3.
^^
and not '...eq 3.', which will achieve the opposite of what was
needed and leave only the cases with all missing values in the
file. Sorry for this mistake, but I hope the original poster could
easily sort *this* out for himself.
Select if (not missing(var1) and not missing(var2) and not missing(var3)).
Execute.
Otherwise you would end up with only the missing cases. Isen't that so?
Greetings
Peter L?vgreen
Fabrizio Arosio <Fabrizi...@ROTTA.COM> on 29-06-98 11:33:50
Please respond to Fabrizi...@ROTTA.COM
To: SPS...@UGA.CC.UGA.EDU
cc: (bcc: Peter L?vgreen/UFV)
Subject: Re: Delete cases with missing values
Content-type: text/plain; charsetus-ascii
Libin,
you need to use the SELECT IF command in the following way:
Select if (missing(var1) and missing(var2) and missing(var3)).
Execute.
The above syntax will permanently delete in your active data file
the cases with var1, var2 and var3 all containing the missing value.
If you wanted to delete that cases only for a particular
SPSS procedure, it is possible to use the Temporary command:
Temporary.
Select if (missing(var1) and missing(var2) and missing(var3)).
<spss procedure 1>
<spss procedure 2>
In the above syntax, only the <spss procedure 1> will work without
the deleted cases; <spss procedure 2> will work with all the cases of
your original data-file.
I hope I've been clear: sorry for my bad english :-).
Greetings,
Fabrizio
Libin Xu <lib...@PGCPS.PG.K12.MD.US> on 26/06/98 21.19.43
Please respond to Libin Xu <lib...@PGCPS.PG.K12.MD.US>
To: SPS...@UGA.CC.UGA.EDU
cc: (bcc: Fabrizio Arosio/RRL/IT)
Subject: Delete cases with missing values
Dear Spssx-lers,
I wonder if anyone can help me with this problem. I want to
delete some cases when the values of all three variables are missing. In
SAS, you can use the command like
if var1missing and var2missing and var3missing then delete. what
should I do with SPSS for Windows? I looked at an old menu which has
select if missing(var). But it won't work with a list of variables.
Thank you for your assistance.
Libin Xu
<spss procedure 2>
Greetings,
Fabrizio
if var1=missing and var2=missing and var3=missing then delete. what