Date: Tue, 22 Sep 1998 12:48:04 -0500
Sender: "SPSSX(r) Discussion" <SPSSX-L@UGA.CC.UGA.EDU>
From: Lester Loschky <lloschky@S.PSYCH.UIUC.EDU>
Subject: Re: Lag vs. Lead functions: Problem is solved! :)
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
> 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.
> sort cases by seq.
> David Matheson
> SPSS Technical Support
Thanks again for everyone's help!
Human Perception and Performance Group
Beckman Institute for Advanced Science and Technology
405 North Mathews
Urbana, IL 61801