spikes: Fraud-detection from vote-share data

Description Usage Arguments Value See Also Examples

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

1
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

1
2
3
4
5
data(data)
## Not run: 
out <- spikes(data, resamples = 1000)

## End(Not run)

spikes documentation built on May 2, 2019, 7:55 a.m.

Related to spikes in spikes...