Date: Tue, 22 Sep 1998 12:48:04 -0500
Reply-To: lloschky@s.psych.uiuc.edu
Sender: "SPSSX(r) Discussion" <SPSSX-L@UGA.CC.UGA.EDU>
From: Lester Loschky <lloschky@S.PSYCH.UIUC.EDU>
Organization: Psychology
Subject: Re: Lag vs. Lead functions: Problem is solved! :)
Content-Type: multipart/alternative;
Thanks to everyone who sent helpful suggestions for how to solve the lag
vs. lead function problem! I have been able to successfully implement a
solution and it worked perfectly! Several people (Ed Tverdek being the
first) suggested the following approach (quoted from a message from
David Matheson):
> 2. Create a variable that is equal to the case number and sort the file
> in descending order on that variable. Use the lag function to compute
> your new variable. Resort the file to the original order.
>
> compute seq = $casenum.
> sort cases by seq (d) .
> do if (lag(subject) = subject and lag(trial) = trial) .
> compute fixdrld = lag(fixdur).
> end if.
> execute.
> sort cases by seq.
>
>
> David Matheson
> SPSS Technical Support
>
Thanks again for everyone's help!
Lester
**************
Lester Loschky
Human Perception and Performance Group
Beckman Institute for Advanced Science and Technology
405 North Mathews
Urbana, IL 61801
E-mail: loschky@s.psych.uiuc.edu
Phone/voice-mail: 217-333-0970
[text/html]