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 (October 2001)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 5 Oct 2001 13:29:44 -0400
Sender:   "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
Subject:   Re: Help
Comments:   To: Subhash Lonial <lonial@LOUISVILLE.EDU>
Content-Type:   text/plain


Try this:

do if (sysmis(var001)). compute var001 = lag(var001). end if.

This will always assign the most recent non-missing value of var001 to the current case if it is missing a value. If the current case has a value already, it will not make a change.

Harley Baker

> -----Original Message----- > From: Subhash Lonial [SMTP:lonial@LOUISVILLE.EDU] > Sent: Friday, October 05, 2001 10:18 AM > To: SPSSX-L@LISTSERV.UGA.EDU > Subject: Help > > I have spss 10.0 data set , 50 variables and 60,000 observations. Two > variables of interest are var001 (numerical) and var002 (four character > string). > var001 var002 > 1 abcd > . abcd > . abcd > . abcd > 13 azcb > . azcb > . azcb > . . > . . > I need to assign value of 1 to var001 for the next three observations and > a value of 13 to next set of observations till the value of var001 changes > to some other value. var001 can go from 1 to 30 and var002 can have all > combinations. > I tried to use a select if command but it is time consuming. Is there a > way to use macro. I do not know macro. Any suggestion. > Thanks. > Subhash C. Lonial > Professor of Marketing > College of Business & Public Administration > University of Louisville > Louisville, Kentucky 40292 > Tel. 502-852-4852 > Fax. 502-852-7672

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