Description Usage Arguments Details Author(s) References See Also Examples
BaB
finds an exact pvalue by solving a 01 knapsack problem.
The 01 knapsack problem is solved by a branch and bound algorithm.
For more details, see Higgins, Rivest, Stark.
1 2 3 4 
Z 
A 
t 
Value of the observed maximum, either as the MRO, as taint, or as the overstatement of the margin in votes. 
asTaint 
Set 
asNumber 
Set 
M 
A priori margin. If NULL, 
takeOutZeroMMB 
Setting 
give.strategy 
If 
bound.col, calc.e_p, w_p 
Arguments used to compute

BaB
preprocesses the data to make the branch and bound algorithm
more efficient, and obtains all information from Z
necessary to perform
the branch and bound algorithm.
BaB
then calls runBaB
, which calls the branch and bound
function.
When give.strategy = TRUE
, the output of the solution will be
a vector strategy
of size length(nrow(Z$strat))
.
The solution can be obtained by, for each stratum i
, putting
e.max
amount of difference in the strategy[i]
batches
corresponding to the largest values of u
.
For more details, see Higgins, Rivest, Stark.
Mike Higgins, Hua Yang
M. Higgins, R. L. Rivest, P. B. Stark. Sharper pValues for Stratified Election Audits
See LKPBound
for finding a pvalue through a continuous relaxation.
See eqValBound
and withReplaceBound
for finding a pvalue through other relaxations.
See runBaB
for running the branch and bound algorithm given
a value vector u
, a cost vector q
, a margin M
, and
a CIDnum
vector.
See compute.stark.t
for computing t
through audit data.
1 2  data(MN_Senate_2006)
BaB(MN_Senate_2006.strat, takeOutZeroMMB = FALSE, give.strategy = TRUE)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.