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 (July 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Sat, 15 Jul 2006 03:31:32 -0400
Reply-To:   Heman Hunters <hemanhunters@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Heman Hunters <hemanhunters@GMAIL.COM>
Subject:   Lookup table in SAS + random numbers in SAS

G'day mates!

Today I have two questions:

1) I have a large dataset, containing people's social security numbers and their income. No I want to select e.g. two percent of the people in the table AT RANDOM, and change their income by 10 percent. How do I accomplish this?

2) Depending on what income, and the social status (married, divorced, etc.) the people above have, I want to give them a certain score. I have (on paper) a list of which income interval and social status goes with which score. Now I want to take the income variable in the table in 1), compare with my "lookup table", and assign the apropriate score to evey person. How do I do this the best way? Do I use a lot of IF:s? Or can I create a table containing income intervals, social status and the corresponding score, and look up values in some clever way?

Thanks lots!


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