Date: Fri, 22 Nov 1996 15:53:25 -0500
Reply-To: Guangzhou Hu <GHU@BINAH.CC.BRANDEIS.EDU>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Guangzhou Hu <GHU@BINAH.CC.BRANDEIS.EDU>
Subject: Help: how to create a group mean and/group median variable
Dear SAS-Lers',
I have a data set that looks like this:
Firm code Project quality
1 2
1 3
1 5
2 1
2 2
2 1
3 2
3 1
. .
. .
The basic unit of observation is project, each firm can have a variable number
of projects. "project quality" is a qualitative variable taking on values from
1 to 5. Now what I would like to do is to create a variable that is the mean
or median quality of a firm's project, i.e., I want each value of the new
variable to be either the mean or median value of a firm's "project quality"
values. The new data set would idealy look something like this:
Firm code Mean quality (or median quality)
1 3.3
2 1.3
3 1.5
. .
I would greatly appreciate any comments or suggestions. Thanks in advance for
your help.
Best regards,
Guangzhou HU
Graduate School of IEF
Brandeis University
|