Date: Tue, 16 Aug 2005 01:14:24 -0400
Reply-To: Richard Ristow <firstname.lastname@example.org>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Richard Ristow <email@example.com>
Subject: Re: exclude missing value
Content-Type: text/plain; charset="us-ascii"; format=flowed
At 01:22 PM 8/15/2005, Parise, Carol A. wrote:
>I'm cleaning up some data and need to select all cases with missing
>values on a location and go through the associated hardcopy to find
>out why the location is missing.
>I have not been successful with selecting my missing locations using
>. SELECT IF ~SYSMIS(locate).
>I've also tried these renditions of selecting missing cases...
>. select if 'locate'=$sysmis.
>. select if $sysmis('locate').
>. select if missing(locate).
>the error in the syntax is that locate is a string variable.
See Hector Maletta's response, of course. To expand on it:
"System missing" is a *numeric* value. (It doesn't sound right that
"there is no number" is 'numeric', but that's how it is.) So, no string
variable can by system-missing. "SYSMIS(locate)" is meaningless, and
therefore invalid, if 'locate' is a string variable.
A string variable can be user-missing (meaning, it has one of the
missing values declared for the variable on a MISSING VALUES
statement), so "MISSING(locate)" is meaningful; but *only* if 'locate'
is 8 characters, or less, long. I'll bet that your 'locate' is longer
than that, so Hector's advice about setting missing values may well not
HOWEVER, it sounds like for your variable 'locate', "missing" means
"entirely blank". THAT you can test for:
. SELECT IF LTRIM(locate) = ' '.
(The LTRIM may not be necessary.)
As always, remember that SELECT IF deletes cases irreversibly. Only use
it if you have a saved copy of the same file.