Myers, J., S.-F. Huang, and J. . Tsay. “Exact Conditional Inference for Two-Way Randomized Bernoulli Experiments”. Journal of Statistical Software, Code Snippets, vol. 21, no. 1, Sept. 2007, pp. 1-7, doi:10.18637/jss.v021.c01.