Twitter: @pakremp
New: What is the probability that your vote will decide the election? (with Andrew Gelman). R code available here.
New: Updating the Forecast on Election Night with R. R code available here.
Last update: Tuesday, November 8, 3:24am ET.
This is a Stan implementation of Drew Linzer’s dynamic Bayesian election forecasting model, with some tweaks to incorporate national poll data, pollster house effects, correlated priors on state-by-state election results and correlated polling errors.
For more details on the original model:
Linzer, D. 2013. “Dynamic Bayesian Forecasting of Presidential Elections in the States.” Journal of the American Statistical Association. 108(501): 124-134. (link)
The Stan and R files are available here.
1455 polls available since April 01, 2016 (including 1129 state polls and 326 national polls).
Note: the model does not account for the specific electoral vote allocation rules in place in Maine and Nebraska.
This graph shows Hillary Clinton’s share of the Clinton and Trump national vote, derived from the weighted average of latent state-by-state vote intentions (using the same state weights as in the 2012 presidential election, adjusted for state adult population growth between 2011 and 2015). In the model (described below), national vote intentions are defined as:
\[\pi^{clinton}[t, US] = \sum_{s \in S} \omega_s \cdot \textrm{logit}^{-1} (\mu_a[t] + \mu_b[t, s])\]
The thick line represents the median of posterior distribution of national vote intentions; the light blue area shows the 90% credible interval. The thin blue lines represent 100 draws from the posterior distribution. The fundamentals-based prior is shown with the dotted black line.
Each national poll (raw numbers, unadjusted for pollster house effects) is represented as a dot (darker dots indicate narrower margins of error). On average, Hillary Clinton’s national poll numbers seem to be running slightly below the level that would be consistent with the latent state-by-state vote intentions.
The following graphs show vote intention by state (with 100 draws from the posterior distribution represented as thin blue lines):
\[\pi^{clinton}[t,s] = \textrm{logit}^{-1} (\mu_a[t] + \mu_b[t, s])\]
States are sorted by predicted Clinton score on election day.