Barnard's unconditional test.
Barnard, G.A. (1945), A new test for 2x2 tables, "Nature", pp. 156-177.
Barnard, G.A. (1947), Significance tests for 2x2 tables, "Biometrika", Vol. 34, pp. 123-138.
Suissa, S. and Shuster, J.J. (1985), Exact Unconditional Sample Sizes for the 2x2 Binomial Trial, "Journal of the Royal Statistical Society", Ser. A, Vol. 148, pp. 317-327.
Lin, C.Y., Yang, M.C. (2009), Improved p-value tests for comparing two independent binomial proportions, "Communications in Statistics-Simulation and Computation", Vol. 38, pp.78-91.
This file was inspired by Trujillo-Ortiz, A., R. Hernandez-Walls, A. Castro-Perez, L.
Rodriguez-Cardozo N.A. Ramos-Delgado and R. Garcia-Sanchez. (2004).
Barnardextest:Barnard's Exact Probability Test.
https://www.mathworks.com/matlabcentral/fileexchange/6198-barnardextest .
and by Cardillo G. (2009) MyBarnard: a very compact routine for Barnard's exact test on 2x2 matrix.
http://www.mathworks.com/matlabcentral/fileexchange/257600 .
A comparison with the the current implementation is given in the last example.
The FSDA team wishes to thank Dr. Ivano Azzini for the current implementation of the Barnard test.