Date: Wed, 22 Apr 2009 12:51:31 -0400
Reply-To: Michael Bryce Herrington <mherrin@G.CLEMSON.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Michael Bryce Herrington <mherrin@G.CLEMSON.EDU>
Subject: Purse Index
Content-Type: text/plain; charset=ISO-8859-1
So I read some of the 'Guidence on question posting' emails going around and
figured I should add some more information to my previous question.
here is a bit of sample data:
*
data* sample;
input track $ track1 $ purse purse1;
datalines;
AP AP 10000 12000
AP HAW 8000 7500
AP CD 10000 8000
BEU AP 5000 6000
BEU CD 7000 7500
CD BEU 12000 15000
CD AP 15000 10000
;
*
run*;
*
data* sample;
set sample;
ap=*28*;
haw=*20*;
cd=*41*;
beu=*4*;
*
run*;
Now I would like to make a variable purseindex that is equal to the value
for track1 divided by the value of track. So we would have another variable
and our data set would look like this:
*
data* sample;
input track $ track1 $ purse purse1 purseindex;
datalines;
AP AP 10000 12000 1
AP HAW 8000 7500 0.714
AP CD 10000 8000 1.464
BEU AP 5000 6000 7
BEU CD 7000 7500 10.25
CD BEU 12000 15000 .0975
CD AP 15000 10000 0.6829
;
*
run*;
I was hoping we could do something like
PurseIndex=track1/track;
And have track1 resolve to (for example) AP which resolves to 28.
Thanks,
--
Bryce Herrington
Clemson University
111 Briar Lane
Central, SC 29630
mherrin@g.clemson.edu
(863) 258-4758