fishers_exact_test icon indicating copy to clipboard operation
fishers_exact_test copied to clipboard

Return Odds

Open davidnarganes opened this issue 4 years ago • 2 comments

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.

davidnarganes avatar Aug 31 '21 15:08 davidnarganes

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

brentp avatar Sep 02 '21 07:09 brentp

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

davidnarganes avatar Sep 02 '21 08:09 davidnarganes