# Are there associated variants in these columns?

I have data that look like this in a 365*804 matrix:

 Sample     Variant1      Variant2        Variant3
Person1      1/0            0/0             1/1
Person2      0/1            1/1             0/0
Person3      0/0            0/0             0/0


I want to see if any Variants are significantly associated with each other. By that I mean, if you see one how likely are you to see another? The possible values are either (0/0, 1/0, 0/1 or 1/1) with 1/0 and 0/1 being the same thing. If weighting is possible, 1/0 and 0/1 should be worth half what 1/1 is. I would prefer to do this in R.

• Are you saying there are 365 people and 804 variants? So that the output would be 804*803 = 645612 three-by-three tables?
– whuber
Commented Mar 29, 2013 at 16:35
• Or do you mean to look at the sums across people, in which case you would have pairs of variants - either 804*803/2 or 365*364/2 pairs - but in either case, a vast number, many of which will be significant even if the data are totally random. Commented Mar 29, 2013 at 16:43
• Yes 365 people and 804 variants. I may be able to the number of variants by pooling later on, so while I was aware that some will occur by chance, multiple testing correction and this pooling will help. I just want ideas of the best way(s) to do this. I want to see if some variants (two or more) usually occur together in different people. By occur I mean are given a non-zero score. Commented Mar 29, 2013 at 18:25

Taking want to see if any Variants are significantly associated with each other more literally, you could estimate some correlation matrix (of size $$804\times 804$$), but then we need some correlation measure for categorical variables. See for instance How to measure correlation between categorical variable? or Correlation and categorical variables.