|Date: ||Sun, 19 Jul 2009 12:50:35 -0500|
|Reply-To: ||OR Stats <stats112@GMAIL.COM>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||OR Stats <stats112@GMAIL.COM>|
|Subject: ||PROC SUMMARY|
|Content-Type: ||text/plain; charset=ISO-8859-1|
I would like to do a PROC SUMMARY for the means and size of the group
membership of my data. The problem is that each record can belong to more
than one group. And I would like to calculate the summary statistics for
the groups in a non-exclusive way.
Group membership is currently captured across binary columns of my data.
record_id A B C D y
1 1 0 0 0 #
2 0 1 0 0 #
3 1 1 1 1 #
Group is therefore A, B, C, or D. In the output summary table, I would have
summarized y by groups A, B, C, and D.And I would like to get the summary
statistic for y by Group, where A includes records 1, 2 and 3; B is just 2
and 3; C is just record 3; and D is also just record 3.
Can I do this in one PROC SUMMARY datastep? Or do I need an intermittent
dataset to reorganize my table above?