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 (December 2002)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 11 Dec 2002 19:50:03 +0200
Reply-To:     =?koi8-r?B?5dfHxc7JyiDiz8zY28/X?= <eugen@KCPIK.ORG.UA>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         =?koi8-r?B?5dfHxc7JyiDiz8zY28/X?= <eugen@KCPIK.ORG.UA>
Subject:      Re: Counter
Content-Type: text/plain; charset="koi8-r"

Hello Anja You can solve this problem in following way.

IF (var1 ~= LAG(var1)) varnew = 1 . EXECUTE . IF (var1 = LAG(var1)) varnew = LAG (varnew) + 1. EXECUTE .

Certainly, you should start this procedure with second case in your datafile.

Eugen Bolshov Ukraine, Kiev

"Anja Langefeld" <langefeld@tm.tno.nl> сообщил/сообщила в новостях следующее: news:3DF765EA.3020604@tm.tno.nl... > Hello, > > This is my question: > my datafile looks like this (var1 and var2). > var1 var2 ... varnew > 1 12 1 > 1 17 2 > 1 15 3 > 1 14 4 > 2 .. 1 > 2 2 > 2 3 > 2 .. > 2 > 2 6 > 3 1 > 3 > .. > > How can I create the variable varnew? > So , that it is a teller? > > thanks > anja >


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