good: Approximate number of contingency tables

Description Usage Arguments Details Note Author(s) References See Also Examples

Description

Approximate number of contingency tables with specified marginal totals.

Usage

1
good(x, method = "D", ...)

Arguments

x

An integer-valued matrix (with no NA entries)

method

The method to use; one of A, B, C, D. See details section

...

Further arguments (notably n), passed to no.of.boards()

Details

All formulae and terminology taken from Good 1976. The letters A-D are from the approximations given on pages 1167 and 1168.

Note This function will accept matrices with any NA entries, but a warning is given. The number of permissable boards will be less than the number of permissible contingency tables considered by Good.

The approximations are intended to provide rough-and-ready upper bounds for boards that have a few NAs.

Note

Method “A” is the exact answer, given by no.of.boards(). Do not use this on large matrices!

Methods “B”, “C”, and “D” give (according to Good) increasingly accurate approximations to the exact answer.

Author(s)

Robin K. S. Hankin

References

See Also

no.of.boards

Examples

1
2
3
4
5
a <- matrix(1,15,15)

good(a,"B")
good(a,"C")
good(a,"D")  #identical to answer given by method "C"

aylmer documentation built on May 29, 2017, 1:12 p.m.