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
Content-Type: text/plain; charset="us-ascii"
I am stuck with this problem and don't think my knowledge is enough to
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.
I need to do this for each pair of the Y values. There will be many
I can't figure out a good way of doing this. Does anybody have some good
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.