brentp / fishers_exact_test

Fishers Exact Test for Python (Cython)
BSD 3-Clause "New" or "Revised" License
62 stars 21 forks source link

Return Odds #33

Open davidnarganes opened 2 years ago

davidnarganes commented 2 years ago

Hi,

The scipy implementation returns the odds ratio, any chance you may be able to provide it? https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.fisher_exact.html

Thanks!

D.

brentp commented 2 years ago

It's certainly useful. I think we'd accept a PR for this but I don't intend to implement.

davidnarganes commented 2 years ago

It's just:

oddsratio = (a_and_b no_a_no_b) / (a_no_b b_no_a)

maybe with +1 on divisor to avoid null divisions...