Florian Hahne
2005-Jul-08 15:00 UTC
[R] exact conditional mantelhaen.test estimate is 0 ?!
Dear listers, I am trying to compute the exact conditional test given strata margins of a 2 by 2 by K array using the mantelhaen.test function to get a common odds ratio estimate. The estimate for the test on the following data is 0, which in my opinion dosen't make any sense. x <- array(c(53, 6098, 1006, 4521, 63, 8070, 1163, 6137), dim=c(2,2,2)) x , , 1 [,1] [,2] [1,] 53 1006 [2,] 6098 4521 , , 2 [,1] [,2] [1,] 63 1163 [2,] 8070 6137 mantelhaen.test(x, exact=TRUE) Exact conditional test of independence in 2 x 2 x k tables data: x S = 116, p-value < 2.2e-16 alternative hypothesis: true common odds ratio is not equal to 1 95 percent confidence interval: 0.0000000000 0.0001190186 sample estimates: common odds ratio 0 Could this be some kind of memory overflow issue since some of the values are quite high? Or am I completely off here? I would appreciate any help on this, Florian -- Florian Hahne <f.hahne at dkfz-heidelberg.de>
Thomas Lumley
2005-Jul-08 17:34 UTC
[R] exact conditional mantelhaen.test estimate is 0 ?!
On Fri, 8 Jul 2005, Florian Hahne wrote:> Dear listers, > > I am trying to compute the exact conditional test given strata margins > of a 2 by 2 by K array using the mantelhaen.test function to get a > common odds ratio estimate. > The estimate for the test on the following data is 0, which in my > opinion dosen't make any sense. >Indeed it doesn't. Some probabilities are underflowing to zero. It is informative to look at the estimates from mantelhaen.test(round(x/s), exact=TRUE) for various values of s. The estimate is stable at about 0.04 for large s until s gets to just above 1.8, then quickly decreases to zero. I think you need exact=FALSE for data sets this large. -thomas
Seemingly Similar Threads
- creating 3-way tables for mantelhaen.test
- about mantelhaen.test (PR#7779)
- About continuity correction option in the mantelhaen.test function.
- How to save results from chisq.test or mantelhaen.test to file
- Testing for significance of overlap in three sets - mantelhaen test?