make.opt.packed.bad: make.truth.opt.bad

View source: R/KM_package.R

make.opt.packed.badR 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).


elec documentation built on April 27, 2022, 1:05 a.m.