multipol (version 1.0-7)

# ooom: One over one minus a multipol

## Description

Uses Taylor's theorem to give one over one minus a multipol

## Usage

ooom(n, a, maxorder=NULL)

## Arguments

n

The order of the approximation; see details

a

A multipol

maxorder

A vector of integers giving the maximum order as per taylor()

## Details

The motivation for this function is the formal power series \((1-x)^{-1}=1+x+x^2+\ldots\). The way to think about it is to observe that \((1+x+x^2+\ldots+x^n)(1-x)=1-x^{n-1}\), even if \(x\) is a multivariate polynomial (one needs only power associativity and a distributivity law, so this works for polynomials). The right hand side is \(1\) if we neglect powers of \(x\) greater than the \(n\)-th, so the two terms on the left hand side are multiplicative inverses of one another.

Argument n specifies how many terms of the series to take.

The function uses an efficient array method when x has only a single non-zero entry. In other cases, a variant of Horner's method is used.

## References

I. J. Good 1976. “On the application of symmetric Dirichlet distributions and their mixtures to contingency tables”. The Annals of Statistics, volume 4, number 6, pp1159-1189; equation 5.6, p1166

taylor

## Examples

# NOT RUN {
ooom(4,homog(3,1))

# How many 2x2 contingency tables of nonnegative integers with rowsums =
# c(2,2) and colsums = c(2,2) are there?  Good gives:

(
ooom(2,lone(4,c(1,3))) *
ooom(2,lone(4,c(1,4))) *
ooom(2,lone(4,c(2,3))) *
ooom(2,lone(4,c(2,4)))
)[2,2,2,2]

# easier to use the aylmer package:

# }
# NOT RUN {
library(aylmer)
no.of.boards(matrix(1,2,2))
# }
# NOT RUN {
# }