Package: elec 0.1.2.2

elec: Collection of Functions for Statistical Election Audits

This is a bizarre collection of functions written to do various sorts of statistical election audits. There are also functions to generate simulated voting data, and simulated "truth" so as to do simulations to check characteristics of these methods.

Authors:Luke Miratrix

elec_0.1.2.2.tar.gz
elec_0.1.2.2.zip(r-4.5)elec_0.1.2.2.zip(r-4.4)elec_0.1.2.2.zip(r-4.3)
elec_0.1.2.2.tgz(r-4.4-any)elec_0.1.2.2.tgz(r-4.3-any)
elec_0.1.2.2.tar.gz(r-4.5-noble)elec_0.1.2.2.tar.gz(r-4.4-noble)
elec_0.1.2.2.tgz(r-4.4-emscripten)elec_0.1.2.2.tgz(r-4.3-emscripten)
elec.pdf |elec.html
elec/json (API)

# Install 'elec' in R:
install.packages('elec', repos = c('https://lmiratrix.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/lmiratrix/elec/issues

Datasets:

On CRAN:

2.30 score 20 scripts 190 downloads 1 mentions 46 exports 0 dependencies

Last updated 3 years agofrom:e7dd894a6e. Checks:OK: 1 NOTE: 6. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 04 2024
R-4.5-winNOTENov 04 2024
R-4.5-linuxNOTENov 04 2024
R-4.4-winNOTENov 04 2024
R-4.4-macNOTENov 04 2024
R-4.3-winNOTENov 04 2024
R-4.3-macNOTENov 04 2024

Exports:audit.totals.to.OScalc.overstatement.e_pcalc.pairwise.e_pCAST.auditCAST.calc.opt.cutCAST.calc.sampleCAST.samplecompute.audit.errorscompute.stark.tcountVotesdo.auditelec.datafind.qfind.stark.SRS.pfind.stratificationfractionOfVotesBoundis.audit.planis.audit.plan.triis.elec.dataKM.auditKM.calc.samplemake.auditmake.audit.from.Zmake.cartoonmake.ok.truthmake.opt.packed.badmake.random.truthmake.samplemake.sample.from.totalsmake.truth.ex.badmake.truth.opt.badmake.truth.opt.bad.stratmaximumMarginBoundopt.sample.sizesim.racesimulateItstark.teststark.test.Ztri.audit.simtri.calc.sampletri.sampletri.sample.statstrinomial.audittrinomial.boundtruth.lookerweight.function

Dependencies:

Readme and manuals

Help Manual

Help pageTopics
Statistical Election Audits Packageelec-package elec
Audit Plans for CAST and Trinomial Methodsaudit.plan is.audit.plan is.audit.plan.tri print.audit.plan print.audit.plan.tri
Converting total vote counts to Over Statementsaudit.totals.to.OS
Functions that Compute Error Levels Given Audit DataAuditErrors calc.overstatement.e_p calc.pairwise.e_p
Given audit data, compute p.values and all that.CAST.audit
Calculate Optimal CAST planCAST.calc.opt.cut
Construct a sample for auditing using CASTCAST.calc.sample
Sample from the various strata according to the schedule set by 'ns'. Ignore all precincts that are known (i.e., have been previously audited).CAST.sample
Calculate the measured error in each of the audited precicnts.compute.audit.errors
compute.stark.tcompute.stark.t
countVotescountVotes
do.auditdo.audit
core election audit data structureelec.data print.elec.data
find.qfind.q
find.stark.SRS.pfind.stark.SRS.p
find.stratificationfind.stratification
Fraction of votes boundfractionOfVotesBound
Check if object is elec.data objectis.elec.data
KM Audit CalculatorKM.audit
Calculate sample size for KM-audit.KM.calc.sample
Make a fake audit given specified error for simulationsmake.audit make.audit.from.Z
Make the cartoon example from the CAST paper as a voter data matrix.make.cartoon
make.truth.opt.badmake.opt.packed.bad
making fake truth for electiosmake.random.truth
Generate fake election results for simulation studiesmake.sample
Make sample from vote totals (for simulations)make.sample.from.totals
Make baseline truth for simulationsmake.ok.truth make.truth make.truth.ex.bad make.truth.opt.bad make.truth.opt.bad.strat
Marin Measure B Reported Resultsmarin
Election Audit Error Bound FunctionsmaximumMarginBound
KM Audit Sample Size Calcopt.sample.size
Pretty print KM audit planprint.audit.plan.KM
Santa Cruz Election Datasanta.cruz
Santa Cruz Election Datasanta.cruz.audit
Simulate CAST audits to assess performancesim.race
simulate KM auditssimulateIt
Workhorse driver for stark.teststark.test stark.test.Z
tri.audit.simtri.audit.sim
Calculate needed sample size for election auditing using the Trinomial Boundtri.calc.sample
Sample from List of Precincts PPEBtri.sample
Utility function for tri.sampletri.sample.stats
Conduct trinomial audittrinomial.audit
Auditing with the Trinomial Bound: trinomial.bound and trinomial.audittrinomial.bound
Looking at fake ``truths'' for election simulationstruth.looker
weight functionsweight.function
Yolo County, CA Election Datayolo