There’s a utility to President Trump’s frequent election-year claims that he can get Republicans elected to office. If Republican legislators believe that he can make or break their political futures, they’ll be more likely to stand with Trump in times of turbulence and support his policy initiatives. It’s clearly the case that concern about how Trump’s political base would view the situation prompted nearly every Republican legislator to oppose the president’s impeachment. Trump wields his endorsement as a stick — while speaking quite loudly.

It’s certainly true that Trump’s endorsement is valuable in Republican primaries, as we’ve reported. His popularity with Republican voters and willingness to bash those who cross him has made him something of a kingmaker within his party. In the 2018 midterms, though, his track record on general election matchups was spottier. By our tally, his endorsed candidates won only about half the time.

New research published in Legislative Studies Quarterly offers an even grimmer assessment of Trump’s effectiveness that year. Far from delivering seats for his party, the analysis by Andrew O. Ballard and Michael Heseltine of American University and Hans J.G. Hassell of Florida State University indicates that Trump actually cost his party seats, 11 in the House and four in the Senate.

Why? Because Trump’s endorsements often helped spur voters to support the Democrat in a contest.

“While President Trump’s public endorsements provided a financial boost to endorsed candidates, they also increased donor support of opposing candidates and were ultimately detrimental to candidates’ vote shares and likelihood of winning,” the researchers write.

The president endorsed 80 House and Senate candidates in 2018, more than half of whom were incumbents. Trump appeared at campaign rallies or fundraisers on behalf of 35 of the candidates, with the others endorsed only via tweet. In many cases, Trump’s endorsements were of people facing no real threat; in other cases, he was clearly hoping that his endorsement would get the Republican over the finish line.

To evaluate the effect of Trump’s endorsement, the researchers looked at district competitiveness, presidential election results, the region in which the contest was taking place and whether it was an open seat.

The result?

“Endorsed candidates suffered worse electoral outcomes than those not receiving an endorsement — even in Senate races where endorsements led to increases in turnout,” the researchers write. “Candidates who received a presidential endorsement were less likely to win than those who did not.”

Trump’s endorsements may “have done little to elicit engagement from voters on the Republican side, all the while creating a rallying effect around opposing candidates and increasing engagement among Democratic voters,” they conclude. “The story then from these findings is that presidential endorsements in 2018 indicated presidential backlash rather than presidential coattails.”

Those Republicans who performed well on election night in 2018 “did so in spite of and not because of a presidential endorsement from an unpopular president,” they write.

Ballard provided The Washington Post with the data showing both how each endorsed candidate actually fared and how he or she would have been expected to perform without Trump’s model, based on their analysis. We’ve highlighted the 16 races where Trump’s endorsement might have handed the Democratic candidate a win — including one race, Minnesota’s 2nd District, where a Republican win was within the window of uncertainty in their results.

If we zoom in on those 16 contests, you can see how the Trump endorsement affected the outcome according to the research.

The animation below shows, first, how the Democratic and Republican candidates might have fared without Trump’s endorsement. We’ve included the range of uncertainty in those estimates. Second, arrows show the shift that Trump’s endorsement might have spurred. Third, where the contests actually ended up.

Looking at all three data points in one static graphic, you can see how the red and blue dots flip: In the estimated shares without endorsements, the red dots are to the right of the blue dots, meaning the Republican got a larger share of the vote. In the actual results, though, the red dots have moved to the left of the blue dots — a loss.

Of course, Trump’s unpopularity broadly was a factor in how his party fared in 2018. What this research suggests is that his endorsement itself had an additional effect that otherwise wouldn’t have been present. It was enough to tip close Senate races in Nevada, Montana, West Virginia and Arizona to the Democrats. It was nearly enough, too, to ensure the reelection of former senator Bill Nelson (D) of Florida, who ended up losing to Sen. Rick Scott (R) by only 10,000 votes.

In an email to The Post, Ballard offered some caveats about how his team’s research should be understood.

He cautioned, for example, that it wasn’t clear that Trump spurred Democrats to turn out more heavily or if the shifts were a function of more people being persuaded to vote for the Democrat after Trump’s endorsement. More importantly, Ballard pointed out that what they learned wasn’t necessarily specific to Trump himself but instead may have been an overlap of specific characteristics of the moment: “an unpopular and divisive president using a relatively new and nationalized form of endorsing candidates” — that is, Twitter — “in a polarized and nationalized electoral context.”

That is itself a tantalizing possibility, that this reproducible combination might be the thing that drove the shift. Meaning, in other words, that it’s a function less of Trump than of the factors that surround who Trump is and how he operates politically.

That might also serve as some consolation to the president. It’s not that he’s a drag on Republicans; it may just be that he’s a particularly unpopular president who relies on a specific platform in a moment when political contests are viewed through the national lens.

Just the window he needs in which to continue to insist that he is delivering for his party.