I am trying do the Fisher Exact Test for more than 400 dates. The Fisher Exact Test works 2×2 possibilities. This test is to many used in molecular markers and genetics studies.
So, if I have to many dates, became impossible make all possibilities one to one combination of markers.
Analysis code in R:
alelo1<-data[,1]
alelo2<-data[,2]
fisher.test(alelo1,alelo2)$p.valeu
I tried do using the:
(for i in)
But I did not had success. How could I do it automatically using R??
Tnks!
Is a bit hard to tell from the question what you want, but if I was able to decipher something I think you want to create 2X2 matrix combinations from the columns of a 2X400 matrix.
So you would have 79800 combinations? I think.
I guess for the fisher.test i,j is the same as j,i and that i=j doesn’t make much sense, so
I would start by doing a function:
Then try the loops with for (i in 1:400) and a while perhaps? or something that makes a triangular matrix with the results. Such as:
I will give you an example with a vector of 10 columns.
same thing should work for 400.