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 2002)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 22 Oct 2002 11:54:31 -0400
Reply-To:     Mark Casazza <Mark.Casazza@domino1.cuny.edu>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Mark Casazza <Mark.Casazza@domino1.cuny.edu>
Subject:      Re: Recode Variable
Comments: To: M˝rcio Machado Ribeiro <marcio_m_r@hotmail.com>
In-Reply-To:  <F7yu9kstC7tXjs5FGJz00000272@hotmail.com>
Content-Type: text/plain; charset="iso-8859-1"

This does it.

-- data list list /vara varb. begin data 1 1 1 2 1 3 1 4 2 1 2 2 2 3 2 4 3 1 3 2 3 3 end data.

sort cases by vara. compute varc = 1. if vara = lag(vara) varc = lag(varc) + 1. list. --

Mark V. Casazza Director of Academic Information The City University of New York 555 W. 57th St. Suite 1240 New York, NY 10019

phone: 212.541.0396 fax: 212.541.0392 email: Mark.Casazza@mail.cuny.edu

-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]On Behalf Of M˝rcio Machado Ribeiro Sent: Tuesday, October 22, 2002 11:11 AM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Recode Varible

Hi listers,

Does anybody knows how do I recode a variable (A) to a different variable (B), doing the following procedure:

Variable A Variable B 1 1 1 2 1 3 1 4 2 1 2 2 2 3 2 4 3 1 3 2 3 3

I mean, I want to create a sequence of the variable B according to variable A. I will probably have to use a syntax procedure, right? Is it possible to create a new variable by a syntax procedure, when I already have the database.

Thanks in advance,

M˝rcio Ribeiro

Get a speedy connection with MSN Broadband. Join now! Click Here


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