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
```
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