This election was supposed to be close — but Republicans were supposed to have a slight edge.

That’s the conclusion of a comprehensive election forecast Vox built that projects the campaign’s outcome based on the most accurate political science models in existence. Jacob Montgomery of Washington University in St. Louis and Texas A&M’s Florian Hollenbach combined six such models into an "ensemble model" that blends them together based on historical accuracy.

The forecast projected that Republicans would get 50.9 percent of the two-party vote and Democrats would receive 49.1 percent of the vote. As with any model, there’s a margin of error (the 95 percent confidence interval is from 43.61 percent of the vote for Democrats to 53.44 percent), but the point estimate was a GOP victory.

But this is a so-called "fundamentals model": It isn’t based on specific knowledge of the two nominees or what kinds of campaigns they’re running or how they’re polling each day. Instead, it relies more heavily on data that’s been predictive across past elections: the state of the economy, President Obama’s approval rating, the fact that Democrats are seeking a third term in the White House, and more.

The model, in other words, is a prediction of what would happen if a generic Democrat ran against a generic Republican. But this election isn’t a generic Democratic versus a generic Republican. It’s Hillary Clinton versus Donald Trump. And that’s leading to a very different result.

On August 11, a few weeks after the conventions (historically, the point in the election when the polls start to really nail the ultimate result), the Huffington Post's Pollster average had Clinton leading Trump 48.1 points to 40.5, for a two-party popular vote share of 54.3 percent. What the American people were telling pollsters was that this wasn’t going to be a close Trump win but a Clinton win by a wide margin.

If the results in November resemble current polling, Republicans are going to do worse than the fundamentals of this election would predict. They will, we think, pay a severe and costly penalty at the polls for nominating Donald Trump. This, then, is the Trump tax — the difference between how we would expect a generic Republican to perform and how Donald Trump is performing.

Uncovering the Trump tax

As we delved into the models Jacob and Florian included in our meta-model, one thing stood out: All but one ignore general election polling, and thus could not capture information about what the American people feel about Trump specifically. And the one that did use polling, that of Columbia’s Robert Erikson and UT Austin’s Christopher Wlezien, had Clinton ahead.

Alan Abramowitz (prediction: Trump victory with 51.4 percent of the two-party vote) uses presidential approval, GDP growth, and incumbency.

Iowa's Michael Lewis-Beck and Hunter's Charles Tien (prediction: Clinton victory, 51.1 percent) use the president's popularity, economic growth, job creation, and incumbency.

Yale’s Ray Fair (prediction: Trump victory, 56 percent) uses per capita GDP, incumbency, party’s time in office, and inflation.

East Carolina’s Brad Lockerbie (prediction: Clinton victory, 50.4 percent) uses polling asking people if they expect to be better off financially in a year or not, as well as the party’s length of time in the White House.

Wlezien and Erikson (prediction: Clinton victory, 52 percent) include national horse race polling but also an index measuring "leading economic indicators."

Stony Brook’s Helmut Norpoth and University of Wisconsin Milwaukee’s Michael Bednarczuk (prediction: Trump victory, 52.5 percent) use New Hampshire primary results as a gauge of party unity, along with the party’s performance in the past two elections.

These models tell us how a generic Republican should do this election cycle. They don’t tell us how Donald Trump will do. And the gap between the forecasts based on fundamentals and predictions based on current polling suggests that by picking Trump, the Republican Party will pay a massive price in the popular vote — making a potential Democratic romp out of what should’ve been a close race.

Of course, there are other reasons why this deviation between polling and fundamentals modeling might exist, reasons that aren’t attributable to Trump. Maybe the models are too confident that voters are ready to move on from parties after two terms; maybe the fact that many use GDP numbers, which have been worse than other economic indicators recently, skews things. Maybe recent polls are too pessimistic about Trump’s chances. Maybe our prediction is just wrong; models tend to have wide error bands, after all.

But the big, big factor looks to be Trump. You see this if you compare how he’s doing to how mainstream Republican candidates like Marco Rubio and John Kasich were polling in the general election. RealClearPolitics’ last average in early March put Rubio up 4 points over Clinton. Kasich versus Clinton was a veritable bloodbath, with Kasich an astonishing 7.4 points up as of late April.

The polling suggests that if Republicans had nominated a strong candidate, they had a real shot at winning this election — a fact that makes us more confident in our ensemble forecast’s prediction of a close Republican win.

Indeed, it’s easy to imagine an election where Republicans are outperforming the models, much as Rubio and Kasich were in March. Clinton, after all, is an unusually unpopular candidate. A majority of Americans view her negatively, and if not for Trump’s presence in the race, she would be the least popular major party presidential candidate since the advent of polling.

This is also why we’re skeptical of the alternative interpretation of the gap between where Republicans are and where we would expect them to be — that Democrats are outperforming the fundamentals because their nominee is simply stronger than expected.

Trump’s flaws have been apparent for some time. Back in March, as Rubio and Kasich were beating Clinton, Trump was trailing the Democrat, often by double digits. And apart from his deficiencies as a candidate personally — his high disapproval ratings, his attacks on Gold Star parents and disabled people, etc. — he’s just not really running a campaign. He has one Florida field office to Clinton’s 12. He didn’t open an Ohio headquarters until August, while Clinton already had a dozen offices (since increased to 19). While he's getting better at fundraising, Clinton is still beating him by tens of millions of dollars. The fundamentals models implicitly assume normal candidates running normal campaigns. That isn’t happening.

Abramowitz, whose model has historically returned the most accurate results of any included in our forecast, has been very clear that he thinks Trump is going to lose the election. "What the model basically says is that if both parties had nominated mainstream candidates, the GOP would be a slight favorite," he told me in an email. "But of course Donald Trump is far from a mainstream candidate."

This is not a normal election

We didn’t plan to do this feature. We originally intended to build an election forecasting model, to give readers a sense of where the election was heading.

The plan was to take Jacob and Florian’s fundamentals forecast as a starting point and use it to create initial estimates of how each state is going to vote in November. Then we’d use a method developed by Drew Linzer, an independent political scientist based in Oakland, California, to update that estimate as more state-level polls came in. Christian Fong, a graduate student in political science at Stanford, took the lead in implementing Linzer’s technique and developing a model that can fold in state polls, obtained courtesy of the Huffington Post’s excellent Pollster site and its accompanying API.

But even when we combined the fundamentals model with recent polls, it kept finding that Trump had a greater than 50 percent chance of victory, in part because early polls are not very predictive (though that is changing as we near Election Day).

To say this was an outlier finding is putting things mildly. By early August, forecasters from Princeton’s Sam Wang to FiveThirtyEight to the New York Times’s Upshot were all finding very high odds of a Clinton victory. FiveThirtyEight’s map was suggesting outcomes like Democrats taking South Carolina. Both it and the Upshot were projecting a Georgia win for Clinton.

The point of a model is to discipline your thinking. And so we had to ask ourselves: Did our disbelief of the model’s results suggest we were wrong, or that the model was?

One possibility was that all these projections and the national polls were wrong and Donald Trump really was about to win, and we were the only ones who knew it. Maybe. These numbers certainly suggested that the other forecasts being published place little weight on the fundamentals relative to polling; it allowed for an odd peek behind the curtain of the FiveThirtyEight and Upshot models, whose full methods haven’t been revealed. Maybe underweighting the fundamentals was a mistake.

But generally speaking, "everyone else but me is getting this wrong" is not a very successful theory. Much more plausible than the possibility of the polls, the other forecasts, and the personal judgments of people like Abramowitz all being wrong was the conclusion that modeling based on fundamentals in a year with a hugely unusual Republican nominee is liable to miss the mark.

The story our model told us didn’t seem like the main story anymore. The main story seemed like the gap between Jacob and Florian’s initial forecast and how Trump is actually polling. What we had done, accidentally, is provide a way to estimate the cost Republicans are paying for nominating Donald Trump.

Enter the Trump tax. Our methodology here is simple. We take the result of Jacob and Florian's ensemble model and subtract Trump's share of the two-party vote according to the latest HuffPost Pollster national polls. That difference is the Trump tax, our admittedly somewhat rough estimate of the gap between where the Republican nominee should be polling this year and where Trump actually is. Again, the difference is not purely attributable to Trump, but he's the main factor.

There’s always the possibility that Trump will turn things around — in which case the Trump tax becomes the Trump bump, an advantage he’s providing to the party. But that’s certainly not how the race has gone so far.

Instead, we appear to be seeing a remarkable example of a major political party blowing a totally winnable national election.