Friday, April 17, 2015

An election model - part 2 - how?

In the previous post, I talked about why I was interested in attempting to model the outcome of the election. The starting point would be a spreadsheet containing the results of the 2010 election - not just the winner of each constituency, but the number of votes cast for each candidate - at least for those candidates who represented parties at a national level. I found a suitable dataset here.

In actual fact, it was more than suitable:
The data-set includes the British constituency results with the 2005 and 2010 share of the vote for each party, the candidates for each party (sex and race), the vote swing, seat changes, and constituency census data.
So I trimmed it down so that it only had the data I needed - basically, the votes for the main candidates in 2010. More specifically, it was the votes cast for the candidates of:

  • Conservative
  • Labour
  • LibDem
  • Scottish National Party
  • Plaid Cymru
  • Green Party
  • British National Party
  • UKIP
in all of the constituencies in Great Britain - that is, England, Scotland and Wales, but not Northern Ireland. The Northern Ireland constituencies weren't included in the table. With the exception of BNP, these conveniently represented all the parties which took part in the televised leaders' debate in March. I also ignored the Speaker's constituency.

In using this as a model to generate results, I made further assumptions.
  • The number of votes cast in a constituency would remain the same in the 2015 election as the 2010 election - in other words, the model would aim to redistribute the votes, rather than assuming a substantial disaffection with voting, or conversely an upsurge in voting, or even a significant change in the electorate.
  • Local processes within a constituency would be irrelevant - or more accurately, would average out across the country as a whole. A constituency might have a particularly good candidate for one party, but this would be balanced by the same party having a ropy one elsewhere.
  • Changes in voting patterns would apply in the same way across the whole country. Note that this can nonetheless be fairly specific - I assumed that there would be greater disaffection with the Liberal party where they did not have an incumbent MP, for example; and changes to popular feelings about then nationalist parties (SNP, PC) would only be relevant in Scotland and Wales, where candidates were standing. I also ignored the Speaker constituency.
I then specified a number of political changes of sentiment, along with the fraction of voters for particular parties that they represented. These can be tailored by changing a coefficient (ie. a number) in the spreadsheet representing this fraction - eg. "Proportion of Conservative voters switching to UKIP", "Proportion of Lib-Dem voters switching away from Lib-Dem without incumbent MP". All these coefficients are applied to the votes from 2010, to redistribute them. Obviously, the party with the largest number of votes following this redistribution wins that seat. The number of seats obtained by each party can be added up, to determine the shape of the House of Commons after this modelled election, and additionally, the total number of votes can be added up, to determine the percentage of people voting for each party, which can then be compared with returns from opinion polls.

So my aim, then, in trying to use the model, would be to specify a set of changes to voting intentions that would result in an outcome of vote percentages that correspond to the results of opinion polls. It would then be possible to look at what impact these changes might have on the size of parties in the House of Commons. Furthermore, the set of changes that I specified should have some resemblance to what seems to be going on in the real world ....

No comments:

Post a Comment