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 (June 2001, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 13 Jun 2001 11:29:19 -0500
Reply-To:     Mark Fisher <mark.fisher@WOMBAT.STATE.TX.US>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Mark Fisher <mark.fisher@WOMBAT.STATE.TX.US>
Organization: Texas Department of Health
Subject:      Recoding many continuous variables into discrete categories

I have several continuous variables I want to recode into discrete categories, based on their quantiles within each by group. For example, if it is within the 0-50th percentile for that group, I want to code it as '1'; within the 51-90th percentile, I want to code it as '3' and if it is greater than the 90th percentile I want to code it as '5'. I have 20 variables with 5 by-groups and 14,000 observations.

I know I can do this with a series of IF statements, but there has to be a more elegant way.


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