spikes {spikes} | R Documentation |
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 |
resamples |
Number of resamples; default |
bw |
Bandwidth for kernel density; default |
grid |
Number of points on which the density is estimated; default |
out |
Object containing parameters of beta-mixture model. If |
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)