The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Type: Package
Title: Detecting Election Fraud from Irregularities in Vote-Share Distributions
Version: 1.1
Depends: R (≥ 3.2.2), emdbook
Date: 2016-09-21
Author: Arturas Rozenas
Maintainer: Arturas Rozenas <ar199@nyu.edu>
Description: Applies re-sampled kernel density method to detect vote fraud. It estimates the proportion of coarse vote-shares in the observed data relative to the null hypothesis of no fraud.
License: GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]
NeedsCompilation: no
Packaged: 2016-09-22 00:05:38 UTC; arturasrozenas
Repository: CRAN
Date/Publication: 2016-09-22 02:27:04

Credible interval

Description

Estimates credible interval by (1) taking a draw from the posterior density (2) implementing the RKD step. The procedure is repeated boot times.

Usage

confInt(object, boots = 100)

Arguments

object

object of class out returned by spikes

boots

number of samples from the posterior; defaul 100


Example data

Description

Synthetic dataset

Usage

data("data")

Format

Precinct-level election data from the 2011 Canadian parliamentary elections..

N

number of registered voters

t

turnout

v

votes for the Conservative party

Examples

data(data)

Ouput object

Description

An object of class out returned by spikes or confint.out.

Usage

data("output")

Examples

data(output)
plot(output)

Plots output of spikes

Description

Plots the observed kernel density of data and the upper envelope of the resampled densities.

Usage

## S3 method for class 'out'
plot(x, main = NULL, ...)

Arguments

x

Object of class out

main

Title, NULL by default

...

additional plotting arguments

Examples

data(output)
plot(output)

Fraud-detection from vote-share data

Description

Implements the resampled kernel density method to detect the excess number of election results with coarse vote-shares (a coarse vote-share is a fraction with a low denominator).

Usage

spikes(data, resamples = 1000, bw = 1e-04, grid = 1001, out = NULL)

Arguments

data

Data frame with three columns with names N (number of votes), t (number who turned out to vote), and v (number who voted for the party the votes of which are being analyzed). Returns error if columns are named incorrectly.

resamples

Number of resamples; default 1000

bw

Bandwidth for kernel density; default 0.0001

grid

Number of points on which the density is estimated; default 1001

out

Object containing parameters of beta-mixture model. If spikes has been called earlier, then out = output$out will skip density estimation and proceed directly to resampling.

Value

spikes returns object of class out.

fraud

Estimated percentage of polling stations with fraud.

ymax

Upper envelope of kernel density samples.

w

Weights for each bin: the proportion of observations falling into a bin.

out

Maximum likelihood estimates of the mixture beta binomial parameters for turnout and votes.

data

Data used in estimation.

See Also

See Also plot.out, summary.out

Examples

data(data)
## Not run: 
out <- spikes(data, resamples = 1000)

## End(Not run)

Internal functions

Description

Internal functions, should not be called by user


Summarize

Description

Extracts estimate of fraud and 95 percent credible interval (if such is estimated) for the object of class out returned by spikes or confint.out.

Usage

## S3 method for class 'out'
summary(object, ...)

Arguments

object

Object of class out

...

additional arguments

Note

If the argument is from spikes, then summary returns degenerate credible interval, as it was not estimated. To return a proper credible interval, confint.out must take as its argument object returned by confint.out.

Examples

data(output)
summary(output)

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.