Skip to content
 

Election updating software update

When going through the Pierre-Antoine Kremp’s election forecasting updater program, we saw that it ran into difficulties when we started to supply information from lots of states. It was a problem with the program’s rejection sampling algorithm.

Kremp updated the program to allow an option where you could specify the winner in each state, and also give an estimate and standard deviation when you have some idea of the vote share.

Here’s an example, based on some out-of-date (from a few hours ago) estimates of Clinton getting 51.5% of the vote in Colorado, 51.5% in Florida, 52.7% in Iowa, 50.7% in Nevada, 52.2% in Ohio, 46.2% in Pennsylvania, and 56.7% in Wisconsin, with standard deviations of 2% in each case:

> update_prob2(clinton_normal = list("CO" = c(51.5, 2), "FL" = c(51.5, 2), "IA" = c(52.7, 2), "NV" = c(50.7, 2), "OH" = c(52.2, 2), "PA" = c(46.2, 2), "WI" = c(56.7, 2)))
[nsim = 100000; se = 0%]

Again, I don’t particularly trust those numbers. But, again, you can now play along and throw in as many states as you want in this way without worrying about the simulations crashing.

P.S. Kremp updated again. Go to his site, refresh it, download the new files on Github, and do some R and Stan!

Leave a Reply