# How to use hierarchical models to predict vote share in elections?

I would like to predict overall vote share $Y$ in a national election in the US as well as the vote share individual states. For simplicity, let's assume that the country has a pure two party system, so $Y$ is simply a proportion of votes to one party.

The data $X$ that I would like to use is a little complicated and consists of several parts $X = \{X_{1,S}, X_{2,S}, X_{3,S}, X_4\}$

1. $X_{1,S}$ is national election data at aggregated at a state level $S$. This is the proportion people who voted a particular way in the last election. For simplicity assume, that we are only interested over on particular electoral cycle.
2. $X_{2,S}$ is census data containing relevant demographic information in state $S$
3. $X_{3,S}$ is state-level representative opinion poll giving voting intentions taken at time $t$ and in state $S$. This will often give a breakdown of the voting intentions by several demographic categories.
4. $X_4$ is nationally representative opinion poll giving voting intentions taken at time $t$. As with the state polls, you also have some demographic information.

A simple model I have seen is to use a Kalman filter to estimate $Y$ is a latent variable with noisy estimates $X_3$ Some models go further and try to estimate the bias of a particular polling companies using $X_{1, \bullet}$. This is done by Jackman in this linked paper.

I would like to try to use the state-level information and pool it to estimate $Y$ on different states. I am interested in this because there may be many state polls around say a gubernatorial election in a point in the electoral cycle where there are few national level polls.

My state level sample is going to biased compared to the national sample, and the selection of the state is obviously non-random. But presumably I can do some matching based on demographic and geographic information to inform my belief about how people in the other states vote. For instance, I believe wealthy voters in adjacent regions are likely to vote in a similar fashion. How do I proceed in R in order to build a model that will make use of this additional state based data?

• What kind of state-level data do you have? Would it be data from all 50 states? Or would some states be missing? – Jonathan Sep 16 '13 at 2:58
• @Jonathan , thanks for your reply. Sorry, it's a very vague question! I have summary statistics and vote estimates from the polls. I do not have respondent level data, so I'm not sure I can apply a Gelman-style hierarchical model. I'm thinking now about how to incorporate hierarchical information into a Simon Jackman-style model. There is lots of missing data at the state level, infact it's mostly missing! I have polls from approximately 1/6 of the states, but these are the most variable states. – MachineEpsilon Oct 4 '13 at 4:11