0

In R, I have two different odds ratios from fisher.test() and manual calculation.

I do not understand how fisher.test() calculates such odds ratio. Could someone explain it?

Also, could you tell me whether it is valid to report fisher.test()'s odds ratio without special note? In the following example, I think the odds ratio is 3.103 by definition, but can I just report the odds ratio is 3.069 which is obtained by fisher.test() and is slightly different from 3.103.

Thank you.

> table = matrix(c(34,7,36,23), nrow = 2)
> table
     [,1] [,2]
[1,]   34   36
[2,]    7   23

> (3423)/(367) [1] 3.103175

> fisher.test(table)

Fisher's Exact Test for Count Data

data: table p-value = 0.02602 alternative hypothesis: true odds ratio is not equal to 1 95 percent confidence interval: 1.094811 9.605329 sample estimates: odds ratio 3.069135 ```

toshi-san
  • 101
  • 1
    The help for the function you called says (under Value): estimate: an estimate of the odds ratio. Note that the _conditional_ Maximum Likelihood Estimate (MLE) rather than the unconditional MLE (the sample odds ratio) is used. ... it explicitly tells you it's not using the same estimator of the population odds ratio that you used.. – Glen_b Oct 04 '22 at 03:24
  • This seems as if it might be a duplicate of this earlier question: https://stats.stackexchange.com/q/54530/805 ... there are a few other related posts. I suppose a good answer might include more discussion on the conditional MLE of the odds ratio. – Glen_b Oct 04 '22 at 03:37
  • Nevertheless, I think the bulk of this is answered there by AdamO – Glen_b Oct 04 '22 at 04:06
  • @Glen_b Thank you very much for your reply. Now, I understand that the difference comes from conditional MLE and unconditional MLE. I will read more articles and will try to learn those different methods. – toshi-san Oct 04 '22 at 12:42

0 Answers0