The uniform distribution on matrices with specified row and column sums is
often a natural choice of null model when testing for structure in two-way
tables (binary or nonnegative integer). Due to the difficulty of sampling from
this distribution, many approximate methods have been developed. We will show
that by exploiting certain symmetries, exact sampling and counting is in fact
possible in many nontrivial real-world cases. We illustrate with real datasets
including ecological co-occurrence matrices and contingency tables.Comment: Published in at http://dx.doi.org/10.1214/13-AOS1131 the Annals of
Statistics (http://www.imstat.org/aos/) by the Institute of Mathematical
Statistics (http://www.imstat.org). arXiv admin note: text overlap with
arXiv:1104.032