View source: R/eggers_vivyan_plurality_pivot_probs.R
eggers_vivyan_probability_of_tie_for_first | R Documentation |
Returns probability of a tie for first between two candidates in a k-candidate plurality election given Dirichlet beliefs, not normalized for electorate size. Uses the approximation introduced by Eggers & Vivyan (2020), which (when there are more than three candidates) involves an independence assumption on the vote shares of candidates 3 to k.
eggers_vivyan_probability_of_tie_for_first(alpha, increments = 50)
alpha |
Length-k parameter vector for Dirichlet belief distribution. See Details. |
increments |
Number of points at which to compute the probability of candidates 1 and 2 tying for first. More increments means a more precise estimate. |
The estimates are not normalized for the size of the electorate (and thus could be larger than 1). Dividing by the electorate size gives (an approximation of) the true pivot probability.
Dirichlet beliefs for a k-candidate plurality election are characterized by
a length-k vector alpha
. It may be helpful to think of alpha
as the product of a vector of expected vote shares
(mu_1, mu_2, ... mu_k)
and a
scalar precision parameter s
. Eggers & Vivyan (2020) find that the
precision of UK election forecasts is characterized by s=85
.
So, given an expected
result of c(.4, .35, .25)
we might model the result by setting
alpha
to c(.4, .35, .25)*85
.
For k=3 candidates the Eggers-Vivyan method produces exact pivot probabilities
(as increments
goes to infinity, and after dividing by electorate size).
For k>3 candidates the probability of unlikely ties for first is overstated due to the independence assumption: the probability of candidates 1 and 2 tying for first at a given vote share x is approximated by the product of
the probability of candidates 1 and 2 receiving vote share x
the probability of candidate 3 receiving below x (given 1 and 2 each get x)
the probability of candidate 4 receiving below x (given 1 and 2 each get x)
etc up to k
eggers_vivyan_probability_of_tie_for_first(c(10, 7, 5)) # non-normalized pivot prob for 3 candidates
eggers_vivyan_probability_of_tie_for_first(c(10, 7, 5))/100000 # normalized for electorate size
eggers_vivyan_probability_of_tie_for_first(c(10, 7, 5, 3)) # 4 candidates
eggers_vivyan_probability_of_tie_for_first(c(10, 7, 5, 3), increments = 100) # more precise
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.