The Democratic debate in Ohio stirred up a heated exchange on a basic economic question: Did robots hollow out American manufacturing?

Sen. Elizabeth Warren, D-Mass., has said that blaming job losses on automation is a myth, and CNN’s Erin Burnett pressed her to explain why workers in Ohio shouldn’t be worried.

"We have had a lot of problems with losing jobs, but the principal reason is bad trade policy," Warren said. "The principal reason has been a bunch of giant multinational corporations who have been calling the shots on trade."

Entrepreneur Andrew Yang shot back that the Americans he talks to are very worried about automation.

"They see a self-serve kiosk in every McDonalds, every grocery store, every CVS," Yand said. "My friends are piloting self-driving trucks. What does that mean for the 3.5 million truckers, or 7 million Americans who work in truck stops, motels and diners that rely upon the truckers getting out and having a meal? Saying this is a ‘rules’ problem is ignoring the reality that Americans see every day."

The reality is that the research backs up both candidates. Trade may well have done more than automation to shrink America’s factory workforce. On the other hand, automation, computers and robots can and have cost people their jobs.

Manufacturing takes a hit

Tracking manufacturing jobs data shows the moment they nosedived in America. It was right around 2000.

The fall after 2000 was so sharp, it’s clear something happened at about that time. Many economists point to China winning permanent "most favored nation" trade status. Chinese imports to the United States grew rapidly, while many American firms shifted production to low-wage factories overseas.

Warren relies on a 2018 study from the Upjohn Institute that looks at the role that trade and automation played in driving down manufacturing employment. One of the explanations is that American firms invested in robots and other technology that replaced humans with machines.

But Susan Houseman of the Upjohn Institute rebutted the automation theory. If robots killed jobs, she argued, the country should have many robots. Instead "the adoption of industrial robots has been limited," Houseman wrote. "The effects of automation in manufacturing were most prominent in the 1980s and had greatly diminished by the 2000s."

As the chart above shows, after the automation surge, manufacturing employment held fairly steady through the 1990s.

Houseman also reported that apparent rises in productivity –– often used to explain falling factory jobs –– are more a statistical fluke than a real phenomenon. That might seem totally academic and esoteric, but it lies at the heart of Yang’s rebuttal to Warren.

Yang’s campaign pointed to a 2017 study from Ball State University economists that found that productivity gains accounted for nearly 90% of manufacturing job losses between 2000 and 2010. Houseman challenged that, noting that the study showed five times as many jobs "not filled due to productivity" in the computer industry as the actual number of jobs lost, a result she called "absurd."

We can’t resolve the dispute.

Other analysts have noted that countries with a larger fraction of manufacturing workers than the United States, such as Germany, South Korea and Japan, all have more industrial robots per capita. Automation by itself, they argue, didn’t seem to undercut factory workers there.

Automation as disruptor

To some extent, Warren and Yang might have been talking past each other. Yang’s point had as much to do with non-manufacturing jobs, like cashiers, as factory work.

In that light, a 2018 analysis, "Will robots really steal our jobs?", from Price Waterhouse Cooper, an international accounting firm, paints a picture where many jobs could be at risk.

Their report lays out three waves of automation. The first has been going on for awhile and is more computational, like the scanners at the grocery store. The second gets into moving things around, like robots in warehouses. The third is much more complex, with decisions made on the fly in real world situations. That is the scenario where self-driving trucks replace human truck drivers.

That third wave is about 10 years off. The threat is real, though.

"In the long run, less well-educated workers could be particularly exposed to automation," the report said. "We do not believe, contrary to some predictions, that automation will lead to mass technological unemployment by the 2030s any more than it has done in the decades since the digital revolution began. Nonetheless, automation will disrupt labor markets."

In their ranking of sectors most likely to be rocked by automation, transportation and storage, followed by manufacturing and construction are at the top, with at least 40% of the jobs in those areas at high risk.

For manufacturing, strong forces will drive much of that change as low-wage countries will continue to attract new factories.

"For economically advanced countries, competing on the cost-side of production is very difficult," wrote Darrell West and Chrstian Lansang with the Brookings Institution. "In order for these countries to keep their manufacturing sectors flourishing, value unlocked through robots, artificial intelligence, and the use of Big Data is essential."

Economist Teresa Fort at Dartmouth College said the relative impacts of trade and automation change from place to place and line of business. Pointing to the steel industry, Fort said, "we don’t need as many workers to create the same amount of output." That’s a technology effect.

But in other areas, such as small home appliances, the flood of Chinese imports drove the trend.

"It really is not possible to tease apart the trade versus technology channels," Fort said. "This is because technology can lead to trade, and because trade can lead firms to adopt new technologies."

So both Warren and Yang have their points. Trade shaped the past and will shape the future. Automation does put jobs at risk, but it isn’t divorced from trade itself, and under the right conditions, it can bolster manufacturing jobs, not undercut them.

For Fort, the trade versus automation debate is a red herring. They both, she said, rearrange the returns for different kinds of work, and many people will end up on the short end of the change.

"If we care about people’s well-being, we should stop debating whether trade or technology led to the loss of certain jobs, and instead focus on how to recognize and facilitate the transition into new job opportunities," Fort said.