toms434


toms434, a FORTRAN77 code which implements ACM toms algorithm 434, for determining exact probabilities of RxC contingency tables.

While the text of many ACM toms algorithms is available online through ACM: http://www.acm.org/pubs/calgo or NETLIB: http://www.netlib.org/toms/index.html, most of the early algorithms are not available. This is one of them. I typed it in.

Usage:

call conp ( matrix, nr, nc, pt, ps, pc )
where MATRIX, is an NR by NC array, containing row sums in the last column and column sums in the last row, and a grand total in the last row and column; PT is the probability of obtaining the given table, PS the probability of obtaining a table as probable as, or less probable than, the given table, and PC is the probability of obtaining any one of the tables with the constraints of the marginal totals, which should be 1.0 exactly, but whose actual value reflects the accuracy of the computation.

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Languages:

toms434 is available in a FORTRAN77 version.

Related Programs:

toms434_test

Reference:

  1. David March,
    Algorithm 434: Exact Probabilities for RxC Contingency Tables,
    Communications of the ACM,
    Volume 15, Number 11, November 1972, pages 991-992.

Source Code:


Last revised on 16 November 2023.