cell-bound: Compute the lower or upper bound

cell-boundR Documentation

Compute the lower or upper bound

Description

Compute the lower or upper bound of a cell in a vectorized contingency table.

Usage

cell_bound(A, b, side = c("lower", "upper"), strategy = c("lp", "ip"))

cellBound(...)

Arguments

A

the configuration matrix of the model defining the fiber

b

solution vector in Ax = b (vector of sufficient statistics)

side

bound side to compute, "lower" or "upper"

strategy

"lp" for linear programming and "ip" for integer programming. (both use lpSolve::lp().)

...

...

Value

an integer

Author(s)

Ruriko Yoshida ruriko.yoshida@uky.edu, David Kahle david@kahle.io

Examples



A <- hmat(c(2,2), 1:2)
b <- rep.int(4, 4)
cell_bound(A, b, "lower") # 0
cell_bound(A, b, "upper") # 4




dkahle/algstat documentation built on May 23, 2023, 12:29 a.m.