Ever since Donald Trump’s upset victory over Hillary Clinton in 2016, much of the media attention has been on how Democrats need to reconsider their strategy for winning voters in future elections, particularly Obama-to-Trump voters. But the results of the 2018 midterm elections suggest that Republicans have some soul-searching to do as well.

They lost the popular vote in six of the last seven presidential elections and suffered battering losses in the House in 2018. Republican strategists must grapple with how to keep their party viable nationally, and our data suggests that Trumpism may continue to hurt them in the future.

It has flown under the radar a bit, masked perhaps by the switch of millions of Barack Obama’s voters into Mr. Trump’s column, but in 2016 Mr. Trump did not receive support from a large segment of voters who pulled the lever for Mitt Romney in 2012. In fact, our data shows that 5 percent of Romney 2012 voters stayed home in 2016, while another 5 percent voted for Mrs. Clinton. These voters tended to be female, nonwhite, younger and more highly educated — the very voters Republicans feared would be alienated by a Trump victory when he was seeking the party’s nomination.

Most strikingly, one-third of 2012 Romney voters who were under 40 in 2016 did not vote for Mr. Trump, but rather stayed home, voted for Mrs. Clinton or voted for a third-party candidate. Among the under-40 Romney voters who supported Mr. Trump in 2016, 16 percent appear to have defected from the party to vote for a Democratic House candidate in 2018. Of course, we don’t know how they will vote in 2020, but what this means is that in the past two elections Republicans may have lost more than 40 percent of Romney voters born after 1976.