search for: 2x2xn

Displaying 2 results from an estimated 2 matches for "2x2xn".

Did you mean: 2x2x4
2003 Dec 11
2
Cochran-Mantel-Haenszel problem
Hello, I've tried to analyze some data with a CMH test. My 3 dimensional contingency tables are 2x2xN where N is usually between 10 and 100. The problem is that there may be 2 strata with opposite counts (the 2x2 contigency table for these are reversed), producing opposite odds ratios that cancle out in the overall statistics. These opposite counts are very important for my analysis, since they ac...
2005 Nov 18
2
(no subject)
...run a Fisher's exact test on thousands of 2x2 contingency tables, and repeat this process several thousand times (this is a part of the permutation test for a genome-wide association study). How can I run this process most efficiently? Is there any way to optimize R code? I have my data in a 2x2xN array (N ~ 5 K; eventually N will be ~ 500 K), and use apply inside the loop: > for (iter in 1:1000) { apply(data,3,fisherPval) } fisherPval <- function(x) { fisher.test(x)$p.value } Right now, it takes about 30 sec per iteration on an Intel Xeon 3.06GHz processor. Thanks in a...