I am working on a project in political analytics looking back on the recent US presidential election. I have built a simple simulation model that works in the following way:
- For each state:
- Aggregate all polls for that state in order to calculate 'true' polling numbers for the 2 candidates. For example, Hillary 46.7% | Drumpf 46.0% in Florida.
- Calculate state win probability from the 'true' polling numbers. For example, Hillary 46.7% | Drumpf 46.0% --> Hillary 62% chance to win Florida, Drumpf 38% chance to win Florida.
- Simulate a random uniform 'z' between 0 and 1. If z < Hillary's chance of winning a state, Hillary wins the state in the simulation.
- Add up electoral votes for each state won by each candidate, to see who won simulation.
Although I am coding my simulation model in R, here is a spreadsheet example of how the simulator above works, roughly speaking, for a few example states.
The difficulty now lies in accounting for correlations between states in this model. As we learned in November, Drumpf winning Michigan meant his changes of winning Wisconsin were also much higher. To begin modeling this, I have built a correlation matrix, a subset of which looks like this:
Thus my question is as follows - how can i include these state to state correlations in my simulation of the election, that is statistically accurate. Thanks!
EDIT - I realized this whole question could be mostly summarized as followed: "how can I simulate 50 correlated random variables if I have the 50x50 correlation matrix"