Generate a ``truth'' that is optimally bad in the sense of the margin in error is packed into as few precints as possible.
make.opt.packed.bad(
Z,
max.taint = 1,
max.taint.good = max.taint,
WPM = FALSE,
add.good = 0,
add.random = FALSE
)
elec.data object to make bad truth for.
max taint for any batch
max taint in good direction for any batch
Use WPM bound on error.
add this amount of margin in good error (i.e. for the winner)
add a random tweak to error
Return the vote matrix (a data.frame) with tot.votes, e.max, and taint computed (NOT the elec data object).
Make an audit data.frame with the error being exactly 1 margin, and packed into a small number of precincts (with some potential for binding amount of error per precinct).
Warning: error is not necessarily achievable as the discrete nature of whole votes is disregarded.