I posted the maps at 538.
And here’s what we did:
For the left column of maps, we fit a multilevel logistic regression fit to Pew Research pre-election polls, with intercepts and slopes for individual income (categorized as -2, -1, 0, 1, 2) with indicators for individual income, state income, and region of the country as predictors. Here’s what the R code looks like:
M1a <- glmer (rvote ~ z.inc2*z.state.income.full + (1|inc2) + (1 + z.inc2|region.full) + (1 + z.inc2 | stnum), family=binomial(link="logit"))
Here, inc2 are the income categories, z.inc2 is income on the continuous -2 to 2 scale (rescaled to have center 0 and standard deviation 1/2), stnum are state indicators, region.full are region indicators (expanded from a state-level vector to a respondent-level vector), and z.state.income.full is state income (rescaled to have center 0 and standard deviation 1/2, and expanded from a state-level vector to a respondent-level vector).
Withing each state, we then did the following: (a) We used the estimates from the above model to compute McCain’s and Obama’s estimated shares of the two-party vote in each of the five income categories; (b) We then summed these, weighting by the estimated proportion (from the survey) of each income category to get total McCain and Obama proportions; (c) We compared this to the election outcome in the state, computed the difference, and shifted the estimates within each income category by that amount so that our estimates are consistent with the actual votes.
For the “whites” maps, we fit the model just to the survey respondents who described themselves as white and non-Hispanic, doing all the steps above, except using the shifts for each state computed using all the data (since our election data is only in aggregate, not by ethnicity).
P.S. Alaska and Hawaii are not included in these surveys.
P.P.S. More discussion here.