hail icon indicating copy to clipboard operation
hail copied to clipboard

[query] implement the Cochran–Mantel–Haenszel test for repeated tests of independence

Open danking opened this issue 10 months ago • 1 comments

What happened?

@jkgoodrich requested this.

It appears to be a fairly straightforward manipulation of the four variables. Hail already has the chi-squared CDF. I think we can implement this entirely in Python.

Acceptance criteria:

  • Tests comparing the results to results from R. Ensure we have tests for small, intermediate, and large p-values.
  • Method should accept at least the four parameters and they should be named a, b, c, and d.
  • Method should return the test statistics as well as its p-value (i.e. the value of the chi-squared CDF at the test statistic)
  • Docs should include concrete examples with explicit values.
  • Docs should include an example of using it in a Hail table.

References:

  • http://www.biostathandbook.com/cmh.html
  • https://en.wikipedia.org/wiki/Cochran–Mantel–Haenszel_statistics
  • https://cran.r-project.org/web/packages/samplesizeCMH/vignettes/samplesizeCMH-introduction.html

Version

0.2.120

Relevant log output

No response

danking avatar Aug 23 '23 14:08 danking

I would like to work on this issue—I will try to implement this.

Will-Tyler avatar Feb 05 '24 20:02 Will-Tyler