LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2003)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 10 Jul 2003 17:03:40 +0100
Reply-To:     David Hitchin <>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         David Hitchin <>
Subject:      Re: Problem selecting first cases
Comments: To: Susan Crawford <>
Content-Type: text/plain; charset=us-ascii; format=flowed

You need to create a variable which is true if the case number is different from the previous one, I'll call it "first".

I am assuming that you have or can create a variable which I have called case, so that you know when the next child's record starts. Then some possible code looks like this

DO IF $casenum=1. COMPUTE first=1. ELSE. COMPUTE first= (time ~=lag(time)) OR (case ~=lag(case)). END IF. EXECUTE.

Note that we have to deal with the first case separately, since there isn't a previous case to compare it with to see if it has changed.

David Hitchin

--On 10 July 2003 09:35 -0600 Susan Crawford <> wrote:

> Hi, everyone. > > We have just finished a huge study of reaction time in children, and > have run into trouble selecting cases for analysis. > > The problem is that after the positive target was displayed, in some > trials, the child made the correct response once and in other trials, > the child made the response three or four times. We only want to look > at the first response if the child made more than one for that trial > when we do our analysis. > > The data file looks like this: > > Type of Target Time Target Came On Time Key Was Hit > Positive 1 45 > Positive 1 75 > Positive 1 95 > Negative 100 > Positive 300 405 > > So for the data file above, I would only want to have the first record, > fourth and fifth. The file for each child ends up being over 1000 > records long, so I need to be able to use syntax to do this. > > Many thanks for helping us!! > > -- > Susan Crawford, M.Sc. > Research Coordinator > Behavioural Research Unit > Alberta Children's Hospital > > Phone: (403) 943-7364 > FAX: (403) 543-9100

Back to: Top of message | Previous page | Main SPSSX-L page