make.opt.packed.bad {elec}R Documentation

make.truth.opt.bad

Description

Generate a “truth” that is optimally bad in the sense of the margin in error is packed into as few precints as possible.

Usage

make.opt.packed.bad(
  Z,
  max.taint = 1,
  max.taint.good = max.taint,
  WPM = FALSE,
  add.good = 0,
  add.random = FALSE
)

Arguments

Z

elec.data object to make bad truth for.

max.taint

max taint for any batch

max.taint.good

max taint in good direction for any batch

WPM

Use WPM bound on error.

add.good

add this amount of margin in good error (i.e. for the winner)

add.random

add a random tweak to error

Details

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.

Value

Return the vote matrix (a data.frame) with tot.votes, e.max, and taint computed (NOT the elec data object).


[Package elec version 0.1.2.2 Index]