LKPBound {elec.strat}R Documentation

p-value Through a Continuous Relaxation

Description

Finds a p-value through the LKP Bound: a continuous relaxation bound of the original 0-1 knapsack problem. Offers an option to include a lower-bound in output, thus computing an upper and lower bound on the exact p-value. See Higgins, Rivest, Stark for more details.

Usage

	LKPBound(Z, t = NULL, asTaint = FALSE, asNumber = FALSE, 
		M = NULL, takeOutZeroMMB = TRUE, LKP.lower.bound = FALSE, 
		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.

LKP.lower.bound

Set LKP.lower.bound = TRUE to compute a lower-bound of the exact p-value in addition to the upper-bound computed from the continuous relaxation. Lower-bound computed according to Higgins, Rivest, Stark.

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

M. Higgins, R. L. Rivest, P. B. Stark. Sharper p-Values for Stratified Election Audits

See Also

See eqValBound and withReplaceBound for finding a p-value through other relaxations. 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

	data(MN_Senate_2006)
	LKPBound(MN_Senate_2006.strat, takeOutZeroMMB = FALSE)
	LKPBound(MN_Senate_2006.strat, t = 2, asNumber = TRUE, 
		takeOutZeroMMB = FALSE, LKP.lower.bound = TRUE)
	
	data(CA_House_2008)	
	CA_House_2008.strat[[1]]$strat$audit <- 1
	LKPBound(CA_House_2008.strat[[1]], t = 0, LKP.lower.bound = TRUE)

[Package elec.strat version 0.1.1 Index]