Posts that use voting behaviour data

Election forecasts

In addition to the blog posts listed in the section below, you may be looking for the election forecasts page.

Blog posts


Free text in surveys - important issues in the 2017 New Zealand Election Study

26 September 2020

I try out biterm topic modelling on a free text question in the 2017 New Zealand Election Study about the most important issue in the election.


Forecasts for the 2020 New Zealand elections using R and Stan

06 June 2020

My forecasts for the 2020 New Zealand general election are out, and predict a comfortable win for Jacinda Ardern's Labour Party either alone or in coalition.


New Zealand Election Study webtool

07 March 2020

I release an improved and updated version of my crosstab webtool for exploring the New Zealand Election Study data, now covering 2017 as well as 2014, and letting the user explore relationship between party vote and a range of attitudes, experiences and demographics.


Polls v results

19 May 2019

The polls did worse than usual in predicting the Australian federal election, but the pundits were far worse than the polls.


House effects, herding, and the last few days before the election

15 May 2019

A few small explorations of idiosyncracies with polls, a couple of days before the Australian federal election.


Familiarisation with the Australian Election Study

22 April 2019

I familiarise myself with the 2016 Australian Election Study, a wonderful source of individual level data on attitudes and behaviour relating to voting.


Website with Australian federal election forecasts

31 March 2019

I've put up a page with my current Australian federal election forecasts for the House of Representatives, which I'll keep up to date until the election comes.


Exploring swings in Australian federal elections

11 March 2019

I explore the data on two-party-preferred voting swings in Australian federal elections and tentatively introduce the ozfedelect R package.


Bayesian state space modelling of the Australian 2019 election

02 March 2019

I tidy up Australian polling data back to 2007 and produce a statistical model of two-party-preferred vote for the coming election.


Seasonality in NZ voting preference?

20 February 2019

I update the nzelect R package with the latest New Zealand polling data, and use a generalized additive model to look for a seasonal impact on support for the current government.


New Zealand 2017 election results

07 October 2017

New Zealand's election results have been released and were within the range of my probabilistic predictions. The pollsters did a good job.


nzelect 0.4.0 on CRAN with results from 2002 to 2014 and polls up to September 2017

05 October 2017

A new version of the nzelect R package is on CRAN, with election results by voting location back to 2002, and polls up to the latest election. I show how to extract and understand the "special" votes and how they are different to advance voting.


Time-varying house effects in New Zealand political polls

16 September 2017

I adjust my state-space model of New Zealand voting behaviour to allow for the house effect of one of the pollsters to change from the time they started including an on-line sample, and get some interesting results.


The long view on New Zealand political polls

09 September 2017

New Zealand electoral polls going back 15 years


More things with the New Zealand Election Study

20 August 2017

I introduce a new web app that allows nons-specialists to explore voting behaviour in the New Zealand Election Study, and reflect on what I've done so far with that data.


Who turned out to vote in the 2014 New Zealand general election?

13 July 2017

I explore the demographic characteristics of who voted (and who didn't), out of people on the electoral roll, in the 2014 New Zealand general election. I use multiple imputation and a generalized linear model with a quasibinomial response. The people who vote tend to have characteristics associated with doing ok out of society (owning a home, having a partner, university qualifications, etc).


Improving state-space modelling of the Australian 2007 federal election

09 July 2017

I revisit the state space model of Labor party vote leading up to the 2007 Australian election; and a re-think about total survey error in the context of polling data leads to a more stable, less wiggly underlying state of voting intention. Also, vectorization in Stan leads to much faster estimation.


State-space modelling of the Australian 2007 federal election

24 June 2017

As part of familiarising myself with the Stan probabilistic programming language, I replicate Simon Jackman's state space modelling with house effects of the 2007 Australian federal election.


Sankey charts for swinging voters

21 May 2017

Sankey charts based on individual level survey data are a good way of showing change from election to election. I demonstrate this, via some complications with survey-reweighting and missing data, with the New Zealand Election Study for the 2014 and 2011 elections.


Web app for individual party vote from the 2014 New Zealand election study

14 May 2017

Introducing a Shiny web tool for exploring individual characteristics and party vote in the 2014 New Zealand general election.


Modelling individual party vote from the 2014 New Zealand election study

06 May 2017

I work through a fairly complete modelling case study utilising methods for complex surveys, multiple imputation, multilevel models, non-linear relationships and the bootstrap. People who voted for New Zealand First in the 2014 election were more likely to be older, born in New Zealand, identify as working class and male.


New Zealand election forecasts

26 March 2017

My New Zealand Election Forecasts web page is up; and I have some reflections on election day randomness, and on quality control.


House effects in New Zealand voting intention polls

21 March 2017

I use generalized additive models to explore "house effects" (ie statistical bias) in polling firms' estimates of vote in previous New Zealand elections.


New data and functions in nzelect 0.3.0 R package

11 March 2017

Version 0.3.0 of the nzelect R package now on CRAN includes historical polling data and a few convenience functions


FiveThirtyEight's polling data for the US Presidential election

29 October 2016

I have a quick look at the polling data used by the FiveThirtyEight website in predicting the USA presidential election results


New Zealand Election Study individual level data

18 September 2016

Individual level data on voting behaviour are freely available from the New Zealand Election Study and everyone should have a go at analysing them!


nzelect 0.2.0 on CRAN

14 July 2016

The nzelect R package is now available on CRAN; so far it has aggregate results by voting place for the New Zealand 2014 general election.


Election analysis contest entry part 4 - drivers of preference for Green over Labour party

16 April 2016

Locations with more self employed, people with Bachelor degrees, no religion, and people living overseas five years ago were more likely to vote Green over Labour in the 2014 New Zealand General Election, and locations with more ethnically Asian and Pacific people, people born in New Zealand, and people with no qualification returned higher votes for Labour over the Greens.


Election analysis contest entry part 3 - interactive exploration of voting locations with leaflet and Shiny

09 April 2016

I talk through some exploratory analysis of voting location with a Shiny application using the {nzelect} New Zealand General Election 2014 data.


Election analysis contest entry part 2 - building the nzelect R package

04 April 2016

I explain the structure and techniques behind building the nzelect R package, which has New Zealand election results, in case anyone is interested or wants to adapt the process for other packages that rely on preparatory data munging.


Election analysis contest entry part 1 - introducing the nzelect R package

03 April 2016

I introduce a new R package, with tidy versions of New Zealand election data (so far only for the 2014 general election). We confirm and discuss some well-known results such as the tendency for the Labour Party to apparently under-perform on party vote; and identify patterns at the Territorial Authority and Regional Council level that are not usually available due to how voting behaviour is normally classified and reported on.