Make a random truth that is with the reported outcome, but has random error scattered throughout.
make.random.truth(
Z,
p_d = 0.1,
swing = 10,
uniform = TRUE,
seed = NULL,
PID = "PID"
)
elec.data object. The original reported results.
chance a batch has error
max amount of error in votes.
if yes, then error is from 1 to swing. If no, then error is swing.
random seed to ease replication
which column has batch IDs.
# Return: elec.data object holding the 'truth'.
Given reported results (Z), make a new data.frame which is the truth (that can be 'audited' by looking at relevant precincts).
This is the generic small error generation used in trinomial paper and elsewhere as a baseline "normal" mode of operations.