Description Usage Arguments Details Author(s) References See Also Examples
first.r, next.r
, and propSizes
obtain sample sizes
so that the total number of samples is fixed.
first.r
uses the first.r
algorithm,
next.r
uses the next.r
algorithm,
and propSizes
finds a vector of sample sizes that is proportional
to stratum sizes.
See Higgins, Rivest, Stark for details about the first.r
and the
next.r
algorithms.
1 2 3 |
Z |
A |
n |
The fixed number of samples.
When |
t |
Value of the observed maximum, either as the MRO, as taint, or as the overstatement of the margin in votes. |
asTaint |
Set |
asNumber |
Set |
M |
A priori margin. If NULL, |
initSamp |
An initial choice of sample sizes.
Used in call of |
The arguments t, asTaint, asNumber, M
are used in first.r
and
next.r
in the call of getEbsMargin
.
The getQ
function is bypassed to increase efficiency.
propStrat
obtains a vector of sample sizes that has exactly n
samples.
It obtains such a sample by sorting values of
k*sum(Z$strat$n)/Z$strat$n
, where k = 0, 1, ...
, in increasing order
and allocating a sample to the strata corresponding to the first n
values.
Ties are broken by choosing the strata with the largest number of batches.
See Higgins, Rivest, Stark for details.
Mike Higgins, Hua Yang
M. Higgins, R. L. Rivest, P. B. Stark. Sharper p-Values for Stratified Election Audits
See get.first.r.samp, get.next.r.samp
,
and get.prop.samp
for finding sample sizes
given constraints on the p-value and the largest observed overstatement.
1 2 3 4 5 6 7 | data(MN_Senate_2006)
MN_Senate_2006.strat$strat$audit <- first.r(MN_Senate_2006.strat, n = 150)
BaB(MN_Senate_2006.strat)
MN_Senate_2006.strat$strat$audit <- next.r(MN_Senate_2006.strat, n = 150)
BaB(MN_Senate_2006.strat)
MN_Senate_2006.strat$strat$audit <- propSizes(MN_Senate_2006.strat, n = 150)
BaB(MN_Senate_2006.strat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.