select cases

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

select cases

Scott Roesch
-----------------------------------------------------------
http://www.noteX.com - your notepad on the Web - try it now!
-----------------------------------------------------------

Hi all:

I would like to truncate a longitudinal data set that I have based on missing data patterns. I have 5 variables representing 5 distinct time-points. I want to delete cases that have missing data at the first 2 time-points (wave1, wave2). How would I go about doing this? My initial thought was to use the Select Cases procedure and use a statement such as:

wave1 <> SYSMIS (and similarly for wave2)

The logic of my statement is to include individuals who do NOT have missing data for the variable wave1. I'm not sure what SPSS uses for not equals to (my <>). Any help would be greatly appreciated.

Scott

Reply | Threaded
Open this post in threaded view
|

Re: select cases

Anton Balabanov
Hi, Scott,

You may use the same Select Cases procedure and specify the statement like
this:
NMISS(wave1, wave2)=0

(or, what is equal, NVALID(wave1, wave2)=2)

Best,
Anton

> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]]
> On Behalf Of Scott Roesch
> Sent: Thursday, March 22, 2007 4:00 PM
> To: [hidden email]
> Subject: select cases
>
> -----------------------------------------------------------
> http://www.noteX.com - your notepad on the Web - try it now!
> -----------------------------------------------------------
>
> Hi all:
>
> I would like to truncate a longitudinal data set that I have
> based on missing data patterns. I have 5 variables
> representing 5 distinct time-points. I want to delete cases
> that have missing data at the first 2 time-points (wave1,
> wave2). How would I go about doing this? My initial thought
> was to use the Select Cases procedure and use a statement such as:
>
> wave1 <> SYSMIS (and similarly for wave2)
>
> The logic of my statement is to include individuals who do
> NOT have missing data for the variable wave1. I'm not sure
> what SPSS uses for not equals to (my <>). Any help would be
> greatly appreciated.
>
> Scott
>
Reply | Threaded
Open this post in threaded view
|

Re: select cases

Richard Ristow
In reply to this post by Scott Roesch
At 08:59 AM 3/22/2007, Scott Roesch wrote:

>I have 5 variables representing 5 distinct
>time-points. I want to delete cases that have
>missing data at the first 2 time-points (wave1,
>wave2). How would I go about doing this? My
>initial thought was to use the Select Cases
>procedure and use a statement such as:
>
>wave1 <> SYSMIS (and similarly for wave2)
>
>I'm not sure what SPSS uses for not equals to
>(my <>). Any help would be greatly appreciated.

Anton Balabanov's advice should work for you. A couple of remarks:

>I'm not sure what SPSS uses for not equals to (my <>)

SPSS accepts NE or ~= or ¬ = or <> (SPSS 15
Command Syntax Reference p.83). Some people
recommend 'NE', because it looks so unlike assignment, etc.

 >BUT<

wave1 <> SYSMIS

 >cannot< work. First, 'SYSMIS' is a normal
variable; you're thinking of the system variable
'$SYSMIS'. More important, system-missing is
considered missing, i.e. no value, not a special
value. (That's a point on which SPSS, with some
good reasons, has chosen to differ from SAS.)

So the result of "wave1<>$SYSMIS" is not true,
nor false, but missing. For most purposes,
including this, a 'missing' test acts the same as
a 'false' one, and no cases would be selected.

As Anton Balabanov wrote, SPSS provides several
functions to test for missing values. NMISS,
which he suggested, is probably right in your case.

The test that gives what you want from
'wave1<>$SYSMIS' is 'SYSMIS(wave1'). Consider
also 'MISSING(wave1)', which tests for
user-missing values as well as system-missing.