I develop a new Markov chain algorithm for sampling from sets of multi-way contingency tables defined by an arbitrary set of fixed marginals and by lower and upper bounds constraints on cell counts. My procedure is called the Bounds Sampling Algorithm (BSA) and it relies on the existence of a method to calculate lower and upper bounds for cell entries. BSA accommodates any pattern of structural zeros or, more generally, of missing cells. I investigate the validity of my approach in several examples, some of which have not been previously analyzed with exact testing methods.
Keywords: Contingency tables, Exact tests, Markov chain Monte Carlo, Structural zeros, Volume test.