[R] strange fisher.test result

(Ted Harding) ted.harding at nessie.mcc.ac.uk
Sat Mar 31 16:05:12 CEST 2007


On 31-Mar-07 13:36:04, Williams Scott wrote:
> A simple question - using the following fishers test it appears that
> the P value is significant, but the CI includes 1. Is this result
> correct?
> 
>> data.50p10min <- matrix(c(16,15, 8, 24),nrow=2)
> 
>> fisher.test(data.50p10min)
> 
>         Fisher's Exact Test for Count Data
> data:  data.50p10min 
> 
> p-value = 0.03941
> 
> alternative hypothesis: true odds ratio is not equal to 1 
> 
> 95 percent confidence interval:
>   0.9810441 10.7771597 
> 
> sample estimates:
> odds ratio 
>   3.138456 
> 
> Thanks for comments
> Scott

Remember that the distribution on which the Fisher Exact Test is
based is a discrete distribution, so what you might expect based
on experience with continuous distributions will not always be
the case.

In the above case, I can see a possible explanation. The p-value
is the probability of the set of data (more extreme to either side)
such that the probability of (say) the element in row 1, col 1 of
the 2x2 table exceeding an upper critical value is less than or
equal to 0.25, and the same probabiltiy 0.025 for being less than
a lower critical value.

On the other hand, the lower confidence bound for the OR is
the smallest value of OR that would not be rejected by a 1-sided
test at P-value 0.025, and the upper confidence bound for the OR
is the largest value of OR that would not be rejected by a
corresponding 1-sided test at P-value 0.025, on the given data.

There is no reason, with a discrete distribution, for the confidence
interval results for OR to agree exactly with the significance test
of "OR=1".

More than that I cannot say without further information.

If you would post the 2x2 table of your data, it would be possible
to be more specific.

Best wishes,
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <ted.harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 31-Mar-07                                       Time: 15:05:09
------------------------------ XFMail ------------------------------



More information about the R-help mailing list