[R] Analyse the effect of group membership

Jim Lemon jim at bitwrit.com.au
Mon Mar 24 22:52:23 CET 2014


On 03/25/2014 04:50 AM, Tom Wright wrote:
> Hi,
> Given a matrix
> set.seed(500)
> matrix(round(runif(100,0,1)),
> 	ncol=5,
> 	dimnames=list(Subject=1:20,
> 	Group=c('A','B','C','D','E')))
>
> Is there an easy way to identify which combinations of groups exist,
> i.e. subject2 is a member of group 'A+B+D+E' however no one is a member
> of 'A+B+C+D'.
>
> I want to analyze if particular combinations of groups have worse
> outcomes than others. I admit I'm not really sure how to do this, if
> anyone has any pointers I'll be happy to hear them.
>
Hi Tom,
This may be useful:

testmat<-matrix(round(runif(100,0,1)),col=5,
  dimnames=list(Subject=1:20,
  Group=c('A','B','C','D','E')))
library(plotrix)
intersectDiagram(testmat)

Jim




More information about the R-help mailing list