make.random.truth | R Documentation |
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" )
Z |
elec.data object. The original reported results. |
p_d |
chance a batch has error |
swing |
max amount of error in votes. |
uniform |
if yes, then error is from 1 to swing. If no, then error is swing. |
seed |
random seed to ease replication |
PID |
which column has batch IDs. |
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.
# Return: elec.data object holding the 'truth'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.