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 (February 2005)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 2 Feb 2005 15:00:34 -0700
Reply-To:     Mario Rivera <>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Mario Rivera <>
Subject:      Combining select values from two variables
Content-Type: text/plain; charset=US-ASCII

Greetings from Denver. I have been trying to figure out how to make some SAS code do the same thing in SPSS and can't figure out the syntax. The SAS code is...

if 1 <= howlong <= 2 then pasttwo = 1; else if 3 <= howlong <= 5 or hadmam = 2 then pasttwo = 2; else pasttwo = .;

I want to create a new variable called PASTTWO using values from HOWLONG and HADMAM. The RECODE command will only work for one variable at a time so HOWLONG and HADMAM cannot be "combined" into the PASTTWO. If anybody has any tips, I'd really appreciate it. Thanks.

Mario Rivera

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