Erich Neuwirth
R at the elections: Election night forecasting and analyses
***********************************************************
At the recent national parliamentary election in Austria the author
published a realtime election night forecast and a voter transition
analysis. The forecast was published on the WWW immediately, and the
analyses were made available somewhat later.
The topic of this paper is to describe the software solution and
infrastructure which allowed to implement the whole project with rather
limited resources, and to discuss the role R played in the whole project.
Let us have a look at the statistical methodology first:
The statistical forecasting and analysis was done using R. The statistical
model underlying both forecasting and analyzing is a Markov transition
model, and some simple assumptions about voter behavior allow to formulate
the problem as a maximum likelihood estimator for a multivariate normal
distribution. The fact that the parameters are probabilities, however,
introduces linear constraints for the parameters. Since the density function
is normal, the estimation problem can be formulated as a quadratic
optimization problem with linear constraints, and the R quadprog package
allows us to implement the estimation procedure in R very easily.
We will discuss how the statistical model is adapted to the
"political facts", implying that the transition problems cannot
be assumed to be homogenous for the whole country.
Furthermore, we will discuss how the computational infrastructure
(hardware, software and manpower) and the distribution mechanism
for the WWW was set up in a way that a very small group of people
was able to run a nationwide accessible real time forecast.
Finally, we will show some statistics about the quality of the
forecast that was achievved.