make.random.truth: making fake truth for electios

Description Usage Arguments Details Value

Description

Make a random truth that is with the reported outcome, but has random error scattered throughout.

Usage

1
make.random.truth(Z, p_d = 0.1, swing = 10, uniform = TRUE, seed = NULL, PID = "PID")

Arguments

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.

Details

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.

Value

# Return: elec.data object holding the 'truth'.


elec documentation built on May 2, 2019, 7:22 a.m.