compute.stark.t {elec}R Documentation

compute.stark.t

Description

Compute the test statistic for election audits, essentially the largest error found in the audit, as measured by the passed functions and methods.

Usage

compute.stark.t(
  Z,
  bound.col,
  calc.e_p = calc.pairwise.e_p,
  w_p = weight.function("no.weight"),
  err.override = NULL,
  return.revised.audit = FALSE
)

Arguments

Z

If it already has an audit table with err and err.weighted then it will use those errors, otherwise it will compute them with compute.stark.err

bound.col

This is the vector containing the maximum number of votes possible in the various precincts.

calc.e_p

Function to compute e_p. Default is calc.pairwise.e_p.

w_p

The weight function to be applied to the precinct error.

err.override

If non-null, use this as the found error in votes rather than the actual errors found in the audit.

return.revised.audit

Return the updated audit frame with the error and weighted errors calculated.

Details

This is an older method that other methods sometime use—it is probably best ignored unless you have a good reason not to.

Value

The test statistic, i.e. the maximum found error in the audit sample, as computed by calc.e\_p and weighted by w\_p.

Author(s)

Luke W. Miratrix

See Also

find.q stark.test


[Package elec version 0.1.2.2 Index]