This takes an election and a truth and conducts a KM audit.
simulateIt(
data,
M = 50,
alpha = 0.25,
plot = FALSE,
debug = FALSE,
return.Ps = FALSE,
truncate.Ps = TRUE
)
a data frame, one row per patch, with: tot.votes, e.max, taint
the maximum number of samples to draw before automatically escalating to a full recount.
level of risk.
plot a chart?
debug diag printed?
Return the sequence of p-values all the way up to N.
Return Ps only up to where audit stopped.
stopPt - number of draws drawn n - number of unique precincts audited
Given a list of all precincts and their true taints and their sampling weights (in data, a data.frame), do a sequential audit at the specified alpha.