In trying to explain House Majority Leader Eric Cantor’s stunning loss, a number of analysts, including Cantor’s pollster, have suggested that Democrats opted to meddle in the Republican primary, and that this is what cost Cantor his seat.

While there is at least some evidence this occurred, I find the suggestion that this caused his defeat highly unlikely, for a few reasons.

First, there is a common-sense angle here. As one Twitter follower wryly noted, Democrats are struggling to turn out their base in the 2014 midterms. It is difficult to conclude that they suddenly turned out en masse for a Republican House primary.

Second, others have investigated this and found no increase in voting in Democratic precincts, which we might expect if Democrats were trying to defeat Cantor in a primary.

Third, the truth is that there aren’t very many heavily Democratic areas in this district. The following histogram looks at Democrat Mark Herring’s vote share by precinct in the 2013 Virginia attorney general’s race. I chose this contest because it was the most “neutral” of the three races on the ballot that year (no strong personalities, no third parties).

Basically, this represents the number of precincts where Herring scored “x” percent of the vote. As you can see, this distribution is clustered heavily between about 27 and 48 percent of the vote for Herring. The vertical dashed line represents the median precinct, where Herring won 41 percent of the vote. This is a Republican district, where the primary was probably dominated by Republican voters.

But let’s ask ourselves: What would we expect things to look like if Democrats really did vote heavily for David Brat in Cantor’s race this week? What follows is simply an illustration, but let’s assume that Herring’s vote share is a perfect stand-in for the number of Democrats in a district. Let’s assume that Republicans voted for Cantor at a rate of 60 percent on average, and that Democrats voted for Cantor at a rate of 40 percent on average. We’ll generate some normally distributed random numbers, which basically means that we allow for variations in Democratic and Republican voting patterns, and calculate how Cantor would perform in the various precincts if these assumptions held.

This is the sort of relationship we’d probably expect to see if Democrats really were turning out en masse and voting fundamentally differently from Republicans: As Herring’s vote share increases, Cantor’s decreases. Even here, the vote in heavily Democratic precincts wouldn’t have made the difference, but with a slight change in assumptions about Cantor’s performance, they would have.

Instead, we see this:

The relationship is in the direction we expect, but it is weak (b=-.09), and statistically insignificant (p=.1). It doesn’t come close to explaining the overall result.

Moreover, remember the assumptions we built into our model: that Herring’s vote share was a good stand-in for the number of Democrats and that Republican/Democratic voting rates were more or less constant. In the real world, for example, rural Republicans might feel differently about Cantor than urban Republicans.

Perhaps more importantly, our assumptions allowed us to shortcut around the ecological fallacy problem (e.g., in reality, there might be more Democrats voting in heavily Herring precincts, or Republicans there might be more anti-Cantor). But *if* Democrats were turning out in droves to vote against Cantor, we’d expect something that looks much more like the first scatterplot than the second. The fact is that the second scatterplot provides some evidence that it wasn’t Democrats.

Let’s take one more stab at this, using two regression analyses that are a bit more complex. For the first, I took Cantor’s vote share, and controlled for whether a precinct was an absentee precinct (which is countywide), the distance from Washington, D.C., to the county (did Cantor perform better in D.C. suburbs?), Herring’s share of the vote in 2013 (as a stand-in for Democrats) and whether a precinct was in Richmond (Cantor’s home base). Unfortunately we don’t have good demographic data for precincts, but I used two countywide measurements: population per square mile, and income. This latter measurement is likely a problem for Henrico County and Richmond City, which are split between poor precincts (largely in the 3^{rd} District) and affluent ones (in the 7th), but again, we’re just trying to get a sense of things.

Intriguingly, Cantor did better among absentee ballot precincts -- about 4.5 percent better, all other things being equal -- suggesting that perhaps Brat really did surge late. However, it isn’t statistically significant (p=.18). Cantor did do worse the further one got from D.C., about five points per hour of driving time (p=.04). Cantor did worse in Herring precincts, but the relationship is weak in absolute terms (the difference between a 60% Herring precinct and a 40% Herring precinct is about four points). Population density is positively correlated with Cantor’s performance, though not significant (p=.09), while income is negatively correlated.

If we insert dummy variables for counties rather than using countywide data, we see similar results: Absentee ballot precincts were about five points better for Cantor, but weren’t significant (p=.08), Herring’s vote share was once again negatively correlated with Cantor’s, and the various county dummy variables are almost all significant: Cantor did very well in Richmond City and Orange County, and very poorly in the Richmond exurban counties: New Kent, Hanover and Goochland.

There are two interesting things here: First, there is evidence that Cantor really did do worse in heavily Democratic precincts. But the relationship is weak, and doesn’t come close to explaining his loss. Moreover, we don’t know it was Democratic voting in these precincts that did Cantor in. It might be something about Republicans in these precincts that caused them to dislike Cantor more; in other words, we might have insufficient controls in place.

Second, the second regression equation in particular is consistent with the “home style” hypothesis from yesterday. Cantor did well in the D.C. exurbs and in his old base in the City of Richmond. He did poorly in exurban Richmond counties, where he was less of a fixture.

Regardless, while crossover Democratic votes might have hurt Cantor somewhat, they don’t appear to have been nearly numerous enough to have cost him his race.