Description Usage Arguments Details Author(s) References See Also Examples
get.first.r.samp, get.next.r.samp
, and get.prop.samp
obtain sample sizes so that, if a maximum observed overstatement
of t
or less is observed, the sample will produce a p-value
less than alpha
.
get.first.r.samp
uses the first.r
algorithm to obtain the sample,
get.next.r.samp
uses the next.r
algorithm to obtain the sample,
and get.prop.samp
finds a vector of sample sizes that is proportional
to stratum sizes.
For details about the first.r
and the
next.r
algorithms, and for a description on how
to produce a sample that will ensure that the p-value
is less than alpha
when no overstatement greater than t
is uncovered,
see Higgins, Rivest, Stark.
1 2 3 4 5 6 7 8 9 | get.first.r.samp(Z, alpha, t, bal=TRUE, numSamp = TRUE, initn = 1,
asTaint = FALSE, asNumber = FALSE, M = NULL,
takeOutZeroMMB=TRUE)
get.next.r.samp(Z, alpha, t, bal=TRUE, numSamp = TRUE, initn = 1,
asTaint = FALSE, asNumber = FALSE, M = NULL,
takeOutZeroMMB=TRUE)
get.prop.samp(Z, alpha, t, bal=TRUE, numSamp = TRUE, initn = 1,
asTaint = FALSE, asNumber = FALSE, M = NULL,
takeOutZeroMMB=TRUE)
|
Z |
A |
t |
Value of the observed maximum, either as the MRO, as taint, or as the overstatement of the margin in votes. |
alpha |
Threshold for the p-value.
If an audit does not uncover an overstatement less than |
bal |
If |
numSamp |
If |
initn |
The first sample size checked by algorithm will have
a total of |
asTaint |
Set |
asNumber |
Set |
M |
A priori margin. If NULL, |
takeOutZeroMMB |
Setting |
Sample sizes from get.first.r.samp
and get.next.r.samp
are obtained by repeatedly calling first.r
and next.r
,
respectively,
while incrementing the total number of samples n
.
The algorithm stops when the sample produced will ensure a
p-value less than alpha
.
Mike Higgins
M. Higgins, R. L. Rivest, P. B. Stark. Sharper p-Values for Stratified Election Audits
See first.r, next.r
and propSizes
for finding sample sizes
given constraints on the p-value and the largest observed overstatement.
Also, see first.r
and next.r
for a brief
description of the first.r
and next.r
algorithms.
See optStrat
for finding optimal sample sizes so that,
if a maximum observed overstatement
of t
or less is observed, the sample will produce a p-value
less than alpha
.
Optimal sample sizes will minimize the number of batches required for audit.
1 2 3 4 | data(CA_House_2008)
get.first.r.samp(CA_House_2008.strat[[3]], alpha = .1, t = .01, asTaint = TRUE)
get.next.r.samp(CA_House_2008.strat[[3]], alpha = .1, t = .01, asTaint = TRUE)
get.prop.samp(CA_House_2008.strat[[3]], alpha = .1, t = .01, asTaint = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.