15.071 | Spring 2017 | Graduate

The Analytics Edge

3 Logistic Regression

3.4 Election Forecasting: Predicting the Winner Before any Votes are Cast (Recitation)

Video 1: Election Prediction

The slides from all videos in this Recitation can be downloaded here: Election Forecasting (PDF).

Errata in slides:

  • Slide 2 states that the candidate with the most votes in a state gets all its electoral votes. While this winner-take-all system is used in most states, there are a few exceptions in which electoral votes are split according to individual voting totals.
  • Slide 2 incorrectly states that the “candidate with the most electoral votes wins the election”. In fact, a candidate needs at least 270 electoral votes (a majority of the 538 available votes) to win the presidential election. If more than two candidates receive electoral votes, it is possible that the candidate with the most electoral votes could fall short of a majority and there would be no winner.

Continue: Video 2: Dealing with Missing Data

Video 2: Dealing with Missing Data

In this recitation, we will be using the dataset PollingData (CSV). Please download this dataset to your computer, and save it in a location that you can easily navigate to in R. This data comes from RealClearPolitics.com.

An R script file with all of the commands used in this lecture can be downloaded here: Unit3_Recitation (R).

Important Note: On some operating systems, the imputed results will be slightly different even if you set the random seed. This is just due to the randomness involved in the multiple imputation process. We’ve provided the imputed data here: PollingData_Imputed (CSV). If your results are not matching after the imputation, you can use this dataset instead.

Course Info

As Taught In
Spring 2017
Level
Learning Resource Types
Lecture Videos
Lecture Notes
Problem Sets with Solutions