• Research
  • Publications
  • Talks
  • Books
    • BMHE
    • BCEA book
    • BMPR
  • Software
    • BCEA
    • survHE
    • blendR
    • bmhe
    • SWSamp
    • bmeta
    • INLA
  • Blog
  • Teaching
    • Summer school

Snap

Bayesian statistics
Miscellanea
Author

Written by Gianluca

Published

April 25, 2017

In the grand tradition of all recent election times, I’ve decided to have a go and try and build a model that could predict the results of the upcoming snap general election in the UK. I’m sure there will be many more people having a go at this, from various perspectives and using different modelling approaches. Also, I will try very hard to _not _spend all of my time on this and so I have set out to develop a fairly simple (although, hopefully reasonable) model.

First off: the data. I think that since the announcement of the election, the pollsters have intensified the number of surveys; I have found already 5 national polls (two by Yougov, two by ICM and one by Opinium − there may be more and I’m not claiming a systematic review/meta-analysis of the polls.

Arguably, this election will be mostly about Brexit: there surely will be other factors, but because this comes almost exactly a year after the referendum, it is a fair bet to suggest that how people felt and still feel about its outcome will also massively influence the election. Luckily, all the polls I have found do report data in terms of voting intention, broken up by Remain/Leave. So, I’m considering P=8 main political parties: Conservatives, Labour, UKIP, Liberal Democrats, SNP, Green, Plaid Cymru and “Others”. Also, for simplicity, I’m considering only England, Scotland and Wales − this shouldn’t be a big problem, though, as in Northern Ireland elections are generally a “local affair”, with the mainstream parties not playing a significant role.

I also have available data on the results of both the 2015 election (by constituency and again, I’m only considering the C=632 constituencies in England, Scotland and Wales − this leaves out the 18 Northern Irish constituencies) and the 2016 EU referendum. I had to do some work to align these two datasets, as the referendum did not consider the usual geographical resolution. I have mapped the voting areas used 2016 to the constituencies and have recorded the proportion of votes won by the P parties in 2015, as well as the proportion of Remain vote in 2016.

For each observed poll i=1,…,Npolls, I modelled the observed data among “Leavers” as yi1L,…,yiPL∼Multinomial((π1L,…,πPL),niL). Similarly, the data observed for ” Remainers” are modelled as yi1R,…,yiPR∼Multinomial((π1R,…,πPR),niR). In other words, I’m assuming that within the two groups of voters, there is a vector of underlying probabilities associated with each party (πpL and πpR) that are pooled across the polls. niL and niR are the sample sizes of each poll for L and R.

I used a fairly standard formulation and modelled πpL=ϕpL∑p=1PϕpLandπpR=ϕpR∑p=1PϕpR and then log⁡ϕpj=αp+βpj with j=0,1 to indicate L and R, respectively. Again, using fairly standard modelling, I fix α1=β1=0 to ensure identifiability and then model α2,…,αP∼Normal(0,σα) and β2,…,βP∼Normal(0,σβ).

This essentially fixes the “Tory effect” to 0 (if only I could really do that!…) and then models the effect of the other parties with respect to the baseline. Negative values for αp indicate that party p≠1 is less likely to grab votes among leavers than the Tories; similarly positive values for βp mean that party p≠1 is more popular than the Tories among remainers. In particular, I have used some informative priors by defining the standard deviations σα=σβ=log⁡(1.5), to mean that it is unlikely to observe massive deviations (remember that αp and βp are defined on the log scale).

I then use the estimated party- and EU result-specific probabilities to compute a “relative risk” with respect to the observed overall vote at the 2015 election ρpj=πpjπp15, which essentially estimates how much better (or worse) the parties are doing in comparison to the last election, among leavers and remainers. The reason I want these relative risks is because I can then distribute the information from the current polls and the EU referendum to each constituency c=1,…,C by estimating the predicted share of votes at the next election as the mixture πcp17=(1−γc)πp15ρpL+γcπp15ρpR, where γc is the observed proportion of remain voters in constituency c.

Finally, I can simulate the next election by ensuring that in each constituency the $^{17}_{cp} $ sum to 1. I do this by drawing the vote shares as π^cp17∼Dirichlet(π117,…,πP17).

In the end, for each constituency I have a distribution of election results, which I can use to determine the average outcome, as well as various measures of uncertainty. So in a nutshell, this model is all about i) re-proportioning the 2015 and 2017 votes based on the polls; and ii) propagating uncertainty in the various inputs.

I’ll update this model as more polls become available − one extra issue then will be about discounting older polls (something like what Roberto did here and here, but I think I’ll keep things easy for this). For now, I’ve run my model for the 5 polls I mentioned earlier and this is the (rather depressing) result.

From the current data and the modelling assumption, this looks like the Tories are indeed on course for a landslide victory − my results are also kind of in line with other predictions (eg here). The model here may be flattering to the Lib Dems − the polls seem to indicate almost unanimously that they will be doing very well in areas of a strong Remain persuasion, which means that the model predicts they will gain many seats, particularly where the 2015 election was won with a little margin (and often they leapfrog Labour to the first place).

The following table shows the predicted “swings” − who’s stealing votes from whom:

Conservative Green Labour Lib Dem PCY SNP
Conservative 325 0 0 5 0 0
Green 0 1 0 0 0 0
Labour 64 0 160 6 1 1
Liberal Democrat 0 0 0 9 0 0
Plaid Cymru 0 0 0 0 3 0
Scottish National Party 1 0 0 5 0 50
UKIP 1 0 0 0 0 0

Again, at the moment, bad day at the office for Labour who fails to win a single new seat, while losing over 60 to the Tories, 6 to the Lib Dems, 1 to Plaid Cymru in Wales and 1 to the SNP (which would mean Labour completely erased from Scotland). UKIP is also predicted to lose their only seat − but again, this seems a likely outcome.


       
© Gianluca Baio 2022-2024