NSS results for politics 2014

August 19, 2014

The results of the 2014 National Student Satisfaction Survey are now out. As with last year’s release, the full data are contained in huge .xlsx files on HEFCE’s website.

Here are the tables for overall satisfaction for all 77 first-degree awarding institutions in the field of politics, together with associated confidence intervals.


Congratulations to Chester and Coventry.

The ballad of #Signon Dy, or constituency-level election results in R

August 6, 2014

CLEA — the Constituency Level Elections Archive — is potentially a fantastic resource. Constituency results for most countries, and Britain in particular, are hard to find in systematic form. CLEA offers systematic results, and has great temporal and spatial coverage.

But… I found it really hard to read the CLEA data into R. It’s supplied as a fixed-width file (no, really), with pre-cooked SPSS and Stata versions. But the Stata version is version 13 only (released last year, with a non-backwards-compatible file-format: what gives?), and the SPSS import in R choked.

Reading the data into R as a fixed width file was difficult not just because I had to enter the lengths correctly (which took some doing), but also because some of the names caused parsing difficulties. Selfishly, parties and individuals in other countries have chosen to use non-ASCII characters (the impudence!), and so I had to spend some time figuring which non-Unicode formatting the data used.

Additionally, some of the strangest meta-characters pop up in candidate and constituency names. My favourite is the story of “#signon dy”, who apparently contested New York’s 2nd Congressional district for the Liberation Whig Party in 1984.

#Signon’s unusual typography is too early to be a hash-tag — but too weird to be an encoding error, which might explain the o&#briens and o&#neils of this world. Lovely though the name is, it causes big problems for R import — since R by default uses the hash character to delimit a comment section, ignoring everything on the remainder of that line. Tracking down this problem took some time…

Anyway, I’ve posted some code on GitHub to pull in the CLEA data properly. Hope you find it useful!

UK’s non-participation in Schengen costs UK travellers £29m in dead time

June 30, 2014

Believe it or not, academics work hard over the summer. In the past four weeks, I’ve made two research trips abroad, to Bergen and Barcelona. They were great trips — but I worked hard to prepare my presentations.

In both trips, I spent time waiting in passport control. On my trip to Bergen, I only had to do this at the end of the first leg, between Norwich airport[1] and Schiphol. Since the Netherlands and Norway both participate in Schengen, I was able to clear arrivals and get on to the city centre bus within about ten minutes.

Without wishing to sound unduly precious — my time is important to me. Specifically, it has an opportunity cost.

The opportunity cost of time lost in transit has been recognized by the government, most notably in its calculations of the economic benefit of HS2. According to WebTAG 2013 (to be used in subsequent infrastructure evaluation), the value of business time is £31.96/hour; the value of leisure time drastically less at £6.04/hour.

Information like this allows us to calculate the costs to UK passengers of the UK’s non-participation in Schengen. (This is only a small fraction of the total cost: the cost of processing passengers is far larger).

Specifically, we can say that the cost to UK passengers is:

  1. number of business visits by UK nationals returning from Schengen participating countries per year *
  2. average wait in hours *
  3. opportunity cost of business time +
  4. number of non-business visits by UK nationals returning from Schengen participating countries per year *
  5. average wait in hours *
  6. opportunity cost of non-business time

Thanks to Travelpac data from the ONS (in turn derived from the International Passenger Survey), we know that there were 4,463,471 business visits by UK residents returning to the UK, and 34,216,766 non-business visits by UK residents returning to the UK. This gives us information for (1) and (4).

We don’t know anything about the average wait in hours at passport control, because the UK Border Force (wisely?) doesn’t collect this information. Rather, it collects information on the percentage of passengers processed within a certain amount of time (25 minutes, for European Economic Area visitors).

Almost all (>95%) passengers are processed within this time, presumably because the Border Force has got better at distributing resources since the chaos of 2012.

If we take one minute and twenty five minutes as lower and upper bounds (and this is quite generous to the Border Force, because the real maximum times are north of two hours), then we can estimate the average time, Taagepera-style, by taking the geometric mean, or five minutes. This gives us information for (2) and (5).

We can then plug the WebTAG 2013 figures in to get the following:

  • cost to business passengers: £11,887,710
  • cost to other passengers: £17,222,439

for a total of over £29 million.

This is a very, very conservative estimate of the cost to UK residents, because it doesn’t count the cost to us of waiting in line to have our passports checked in other member states.
If wait times in other member states are similar to those in the UK, then the cost is double this figure.

This estimate is also very conservative because it ignores the cost to government. It costs £2.85 to process each passenger visit. This number can’t be multiplied by the number of visits from Schengen member states, because it ignores fixed costs, and different (likely higher) costs for non-EEA visitors. But the processing cost is very much larger, because it doesn’t just include the 38 million visits of UK nationals from Schengen countries, but the visits of all visitors coming from Schengen countries.

29 million might seem like small potatoes — but whenever I have to show my passport flying to a Schengen member state, I feel like I would quite like my slice of that money back.

[1] Sorry, Norwich International Airport — an airport which tries to justify the pretensions embodied in its name by the most ridiculous forms of security theatre.

Independence, accountability, and quality of competition authorities

June 24, 2014

I’m just heading to Barcelona for the 2014 conference of the ECPR Standing Group on Regulatory Governance. I’ll be presenting a paper that I’ve written with Christel Koop, on the quality of competition authorities. We want to explain why some competition authorities generally are regarded quite well, whereas others are regarded as striving but failing. In particular, we’re interested in design features like independence and accountability. For me, this is because I’ve done previous consultancy research which has suggested these things matter.

You can find a draft of the paper here. It’s still very drafty, and the analysis will likely change — but since due to a scheduling snafu there’s nowhere to put it on the conference website, I thought I should put it on my own site.

Key claims/findings:

  • We can analyse star ratings from the Global Competition Review as if they were ranks
  • We can do so using an exploded logit model
  • We find that both independence and accountability have a positive effect on quality at the 10% level or better
  • These results are even more robust if you think an exploded logit model is a barmy way of going about things, and use an ordered probit instead

Party support in EP elections, East of England edition

May 26, 2014

Although the availability of official electoral data in the UK continues to be execrable compared to any other European country, the good people at Chelmsford Borough Council have at least proceeded swiftly to publish a spreadsheet showing party support at the local authority level.

I’ve put these in a slideshow below, but you can download the pngs from the list below, or tweet me for printable PDFs/R source code.

This slideshow requires JavaScript.

Economic hurt doesn’t make people think about economics

May 26, 2014

On Twitter, Duncan was musing about the link between London’s relative economic success and Labour’s relative electoral success there.

Another tweeter (sorry, can’t remember who) suggested that this was particularly puzzling given the (presumed) resonance Labour’s emphasis on living standards ought to have with people in parts of the country that have been doing less well.

The logic here is clear: poor economic conditions cause people to think about the economy, and select the party that they think is doing best on that issue. Unfortunately, people don’t seem to follow that logic.

Here’s a plot from the latest BES data showing the percentage of respondents who say that the most important issue facing the country is the economy in general, or unemployment.


Weird, no? Reading from left to right, the better your economic situation, the more important it becomes to you, until we get to the people who’ve done really well. Or, reading from right to left: the more your economic situation has worsened, the less important it is to you.

Why is that? Here’s another graph of “most important issue” responses. Now, the most important issue is migration.


Here, economic “losers” are more likely to think immigration is a big issue than are economic “winners”. So it looks like economic hurt makes people more likely to think about cultural and economic threats, rather than the economy in general.

This pattern is robust to controls for ethnicity and education, which have also been invoked to explain London exceptionalism.

I should note: I’m not an expert on electoral behaviour, and I’ll gladly defer to others who can make more sense of this pattern than I can.

Which are the best performing government departments? (2013/4 update)

May 23, 2014

A year ago, I blogged about the best-performing government departments, judged by the traffic light ratings of the Major Projects Authority.

Last year, the data was buried — release on a Friday at 5pm. This year’s release of the MPA ratings has been buried beneath the local election results.

You can find this year’s data on the gov.uk website. The data refer to evaluations made as of September 2013 — so really, we’re comparing 2012 to 2013.

When we average department ratings, how does their relative performance change?
Here’s a table which will help (apologies for tabular presentation – but plotting this as a slopegraph is awkward).

Dept 2012 2013 Change
CO 3.20 2.88 -0.33
DoH 3.71 2.96 -0.75
DEFRA 3.50 3.00 -0.50
DfID 4.00 3.00 -1.00
HMT 2.50 3.00 0.50
HO 3.42 3.15 -0.27
DCMS 2.80 3.17 0.37
MOD 3.46 3.24 -0.22
DfT 3.47 3.25 -0.22
MoJ 3.50 3.33 -0.17
DWP 3.33 3.36 0.03
FCO 3.67 3.40 -0.27
ONS 2.80 3.40 0.60
BIS 3.50 3.45 -0.05
DECC 5.00 3.50 -1.50
DfE 3.50 3.50 0.00
DCLG 3.25 3.67 0.42
HMRC 3.67 3.75 0.08
NS& I 2.00 5.00 3.00

In terms of relative improvement — bouquets to NS&I, ONS, HMT, and DCLG; brickbats to DECC, DfID, and DoH.

UNS will be more broken in 2015 than it usually is

April 6, 2014

Uniform national swing is one of those psephographical tricks that shouldn’t work, but does. There’s not much reason to believe that the local swing towards a party will reflect the national swing towards that party.

Yet UNS has a tremendous record. Suppose that we take two adjacent elections, and `de-mean’ each constituency result — that is, subtract the national average.
If uniform national swing is right, then these de-meaned constituency results should be very closely related. (Contrariwise, if the demeaned constituency results were very different, that would mean that lots of local swings had interfered with the pattern seen in the previous election).

That’s exactly what we find. Taking Danny Dorling’s historical archive of election results, then the pairwise correlation of demeaned constituency results for twentieth century elections for the Conservative party is astonishingly high — between 0.97 and 0.99. You ordinarily don’t get correlations of that magnitude in social science.

But in 2015, UNS is going to face severe problems because of the collapse of the Liberal Democrats. In 2010, the Lib Dems polled 23% of the vote, six percentage points behind Labour. Currently, the UK Polling Report average has them on 10%, implying a swing of thirteen percent away from the party.

The problem is that in seventy one constituencies across the country, the LibDems had a vote share of less than 13%. UNS therefore implies negative vote shares.

You might say that this doesn’t particularly matter, since UNS is usually used for predicting seat shares, and the Lib Dems were never going to win these seats in any event. But it does still matter, because in these seats other parties cannot gain as much from the Liberal Democrats as they do averaged across the country.

Now, the LibDems might recover in the polls — and it’s hard to see them falling much further. If they recover to 14.3%, as Steve Fisher suggests, then UNS will only be `broken’ (in the sense of predicting negative vote shares) in the eleven constituencies where the LibDems polled less than 8.7%. But the 2015 election will nonetheless prove a more difficult test for UNS than some recent elections.

Slides for my talk today at Exeter Q-Step event

March 20, 2014

I don’t know how intelligible these will be if you’re not attending the talk — but here are my slides on forecasting the 2015 General Election.

I don’t include a prediction of my own, because I’m still working on the code to learn about constituency offsets from individual poll responses — in particular, how to set the priors on the offsets so that unusual poll sequences don’t give implausible estimates.

So instead I’ve borrowed from Steve Fisher’s honest-to-god forecast, and UK Polling Report’s UNS-based nowcast.

All of this is really joint work with Nick Vivyan and Ben Lauderdale — except that they don’t bear any responsibility for any hideous mistakes I’ve made.

Pooling the polls in Stan: a bleg

March 4, 2014

I’ve been experimenting with Stan recently. I’ve been working in Stan rather than Jags because I’m doing some work on pooling the polls properly — that is, where levels of support are drawn from a multivariate normal distribution jury-rigged so that draws sum to one. That jury-rigging requires a singular covariance matrix, which can’t be inverted to give the precision matrix that Jags needs. (And no, pseudo-inverses don’t work).

Whilst experimenting with Stan, I’ve found out a number of things about simplexes and just how picky Stan is about its covariance matrices being positive definite — but I had thought I was getting places.

Until today. I thought I should start simple, and try and getting a simple univariate poll-pooler going. I busted out the Jackman BASS code, and wrote up a quick implementation in Jags, omitting the house effects.

Now I find that I can’t replicate that in Stan. I can get a model which samples — but it just gives me back my initial values. If I don’t supply initial values, the model won’t initialize. I’ve eliminated the obvious suspects — confusing precision and variance, for example, or dealing with Stan’s inability to handle inputs that are part-missing.

My code (for both Jags and Stan) is at GitHub. Any ideas?

Update: Ben Lauderdale kindly pointed out that Stan uses the standard deviation for the normal, rather than the variance, so I was off by an order of magnitude. He also took a red pen to the code, meaning that the resulting much cleaner code (which is entirely to Ben’s credit if it works efficiently, and entirely my fault insofar as it doesn’t) is now on GitHub.

Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org