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 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 24 Jul 2008 16:58:39 -0400
Reply-To:     "Cui, Anna" <CUIS@RPI.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Cui, Anna" <CUIS@RPI.EDU>
Subject:      data transformation question
In-Reply-To:  A<482249F865060740AE33815802042D2F01643CBB@LTA3VS012.ees.hhs.gov>
Content-Type: text/plain; charset="us-ascii"

Hi all,

I am stuck with this problem and don't think my knowledge is enough to solve it.

I have a dataset with two variables X and Y. Y can take a list of about 300 values (the list is known), and different Xs can have the same value of Y. I need to calculate 2 things:

1. The number of times when a pair of Y values show up for the same X. e.g. in the following dataset, the number for the pair (250, 246) is 1, the number for the pair (250, 101) is 0.

X Y 11 250 25 101 63 150 12 125 11 246 12 255 11 231

I need to do this for each pair of the Y values. There will be many pairs. I can't figure out a good way of doing this. Does anybody have some good ideas?

2. The number of times each value of Y shows up in the dataset. I can do the counting, but how to match the counts with each value of Y and save the counts to a dataset?

Thank you very much.

Anna


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