
The 'Modified' Fisher Exact Test - R Package
Hi all.
For the past few months I've been working on the modifiedfisher R package. It's an R version of the SAS algorithm included in the van der Meulen EA, Raymond K, van der Meulen PJ (2021) paper (I am the latter author). The paper, and package, implements a non-conservative, size-α modified Fisher exact test for comparing two independent binomial proportions.
This modified test rejects at a borderline outcome if and only if its randomisation probability exceeds a single threshold, chosen in such a way to bring the actual size as close to α as possible. The p-value and confidence interval agree as they are both derived from this test.
GitHub and full docs: https://github.com/pvdmeulen/modifiedfisher
I was hoping folks in the biostats field are able try this out before I submit to CRAN in due course. I am an economist/econometrician so this is fairly out of my wheelhouse. Aware there's also plenty of debate re: the use of unconditional/conditional tests, but hopefully this is a useful addition to the toolbox available to (bio)statisticians, particularly in small samples when it is appropriate to condition on T. Even feedback on general R package etiquette and structure would be useful, of course.
---
On a more personal note - this is an important project to me, as my father (EA van der Meulen) passed away a few months after we published this paper. My contribution was mostly on the algorithm side, and the R package was always 'my' next step.