=========================================================================
Date: Tue, 11 Jul 2006 15:01:26 +0100
Reply-To: j.s.lemon@abdn.ac.uk
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: "John S. Lemon" <j.s.lemon@abdn.ac.uk>
Organization: University of Aberdeen, Scotland
Subject: Re: Easy problem
In-Reply-To: <200607111355.k6BApCSA005922@malibu.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Lou wrote:
> I have an easy problem (I reckon). I need to generate a variable which
> basically repeats the numbers 1, 2, 3. In other words, I have a data file
> in which each individual has three records (cases) and I just need to mark
> up the different records as 1, 2, 3. Could someone tell me how to do this
> please?
>
Try this syntax code ( untested ).
COMPUTE COUNTER = 1.
IF ( ( MOD ( $CASENUM, 2 ) ) EQ 0 ) COUNTER = 2.
IF ( ( MOD ( $CASENUM, 3 ) ) EQ 0 ) COUNTER = 3.
Hope this helps
--
Best wishes
John S. Lemon Mailto:j.s.lemon@abdn.ac.uk
DISS - ASD (Computing) Tel: +44 1224 273350
Aberdeen University - Scotland
|