|Date: ||Mon, 10 May 2004 14:25:14 -0400|
|Reply-To: ||"Jed J. Teres" <firstname.lastname@example.org>|
|Sender: ||"SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>|
|From: ||"Jed J. Teres" <email@example.com>|
|Subject: ||Re: selecting cases|
|Content-Type: ||text/plain; charset="us-ascii"; format=flowed|
Thanks for your help. Your comments pointed me in the right direction. In
the end, I used the LEAD command, which is like LAG, but sets variables
back instead of forward.
At 01:58 PM 5/10/2004, Bob Walker wrote:
>SELECT IF LAG(EVENT)=1
>or similar if your variable is different.
>Surveys & Forecasts, LLC
>From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Jed
>Sent: Monday, May 10, 2004 1:42 PM
>Subject: selecting cases
>I have an observation-level data set and I need to select observations in
>which a certain event occurs as well as the preceding interval.
>Selecting the event intervals is easy- I can just say, "select if (event eq
>1)." How can I get the case immediately preceding this one?
Weill Medical College of Cornell University
Department of Psychiatry
525 East 68th Street
New York, NY 10021