p-value Through Relaxation on Number of Batches Without Difference

Description

eqValBound and withReplaceBound find a p-value by changing the original constraint (that the total difference is greater than the margin), instead placing a restriction on the number of batches with error no larger than t.

eqValBound finds an exact solution with this restriction, whereas withReplaceBound finds a more conservative bound. See Stark for more details about withReplaceBound.

Usage

1
2
3
4
5
6
	eqValBound(Z, t = NULL, asTaint = FALSE, asNumber = FALSE, 
		M = NULL, takeOutZeroMMB=TRUE, bound.col = "e.max", 
		 calc.e_p=calc.pairwise.e_p, w_p = weight.function("no.weight"))
	withReplaceBound(Z, t = NULL, asTaint = FALSE, asNumber = FALSE, 
		M = NULL, takeOutZeroMMB = TRUE, bound.col = "e.max",  	
		calc.e_p=calc.pairwise.e_p, w_p = weight.function("no.weight"))

Arguments

Z

A strat.elec.data object.

t

Value of the observed maximum, either as the MRO, as taint, or as the overstatement of the margin in votes.

asTaint

Set asTaint = TRUE if t is the maximum observed taint.

asNumber

Set asNumber if t is the maximum observed overstatement of the margin in votes.

M

A priori margin. If NULL, M defaults to 1.

takeOutZeroMMB

Setting takeOutZeroMMB = TRUE will consider batches with a maximumMarginBound of zero as having no chance of being sampled.

bound.col, calc.e_p, w_p

Arguments used to compute t from audit data, instead of passing t directly. These arguments are ignored if t is not NULL. See compute.stark.t for details.

Author(s)

Mike Higgins, Hua Yang

References

P.B. Stark. Conservative Statistical Post-Election Audits. Annals of Applied Statistics, 2:2. 550-581.

See Also

See LKPBound for finding a p-value through a continuous relaxation. See BaB for finding an exact p-value through solving a 0-1 knapsack problem. See compute.stark.t for computing t through audit data.

Examples

1
2
3
4
	data(MN_Senate_2006)
	eqValBound(MN_Senate_2006.strat, takeOutZeroMMB = FALSE)
	withReplaceBound(MN_Senate_2006.strat, t = 2, asNumber = TRUE, 
		takeOutZeroMMB = FALSE)