I’ll be liveblogging the general election tonight. In particular, as the results come in, I’ve written a program that will predict all the seats based on the results already declared. (The output will look like this).
It works by classifying seats according to region, for example Scotland or London, and based on who came first and second last time, e.g. Lab/Con marginal. It then predicts the results in the uncalled seats based on average swings in the type of seat they belong to.
More precisely, for each uncalled seat it uses the weghted average of (1) all seats (weghting 1), (2) all seats in same region (weighting 2), and (3) all seats of same type (weighting 4). “Type” is one of: Lab/Con, Con/Lab, LD/Con, Con/LD, Lab/LD, LD/Lab, SNP 1st or 2nd, Plaid Cymru 1st or second.
The dataset I’ve used is the notional 2005 results from Electoral Calculus, i.e. what the 2005 result would have been if fought on current boundaries. These notional results lump together the minor parties, so the program won’t predict their vote share correctly. I’m also not trying to predict the result in Northern Ireland, as that is fought by different parties on different issues to the rest of the UK.
Anyway, I’m off to vote now.