Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Leveling groups

Status
Not open for further replies.

jawon

Programmer
Feb 6, 2003
31
US
I don't even know correct terminology for this type of work so I'll try to explain...

1. I have about 50 groups that each have a varying number of people in them. For example, GroupA=100, GroupB=50, etc.

2. I would like to assign them each into one panel within a 3x3 matrix in a way where all the panels have about the same number of people in them.

I'm hoping there is some SAS procedure to identify the best combination of groups, or at least some programmatic way to handle this. Any ideas would be appreciated.
 
Hmm, so do you want 50 panels with 9 cells (each cell having n/9 subjects)?
 
For example...

GroupA=100
GroupB=50
GroupC=20
Etc.

I need to distribute these groups into the 9 cells. Then I would get a total sum for each cell. The standard deviation of the cell totals should be as small as possible (ie, the range between the largest and smallest cell should be as small as possible).

Hope that made sense!
 
OK, sounds like you want to cluster the groups into 9 cells, each cell having groups with similar sample size. If that's the case then you may want to use proc fastclus (creates disjoint clusters, minimizes variance across clusters).

You'd need a data set containing each group and its respective sample size (1 record per group). The code would look like...

Code:
proc fastclus data=yourdata maxclusters=9 out=groups;
    var groupsize;
run;

The data set work.groups will contain a variable called cluster, this is your new cell assignment.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top