Men of prime age in the U.S. participate in the labor force at a lower rate than men in other advanced economies, a gap partly explained by higher incarceration rates and opioid abuse, according to research from Goldman Sachs.

The male participation rate is now more than 3 percentage points below the average of other developed markets, and nearly 7 percentage points behind Japan. One-third of the difference can be explained by the much higher number of men in jail and prison in the United States compared with other countries and the scourge of health problems associated with drug and painkiller abuse, the research said.

The unemployment rate was 4 percent in June, according to labor data released last week. Overall, workforce participation rose to 62.9 percent from 62.7 percent, but it was a surge in female workers without college degrees that accounted for most of that increase, according to Goldman Sachs senior economist Daan Struyven, who wrote the research note earlier this week.

A notable trend was the gap between men in the U.S. aged 25 to 54 and their counterparts in other big economies. Participation was 89.1 percent versus 92.3 percent for the larger group. The comparison countries are Japan, Germany, France, Britain, Italy, Canada, Netherlands, Belgium, Sweden, Australia, Norway and New Zealand.

About half a percentage point of that difference results from the effect of incarceration on employment, including the difficulty of getting hired with a felony record, Goldman said.

There are 2.1 million people locked up in the U.S., according to the World Prison Brief, about 90 percent of them men. About one-fifth are detained before trial.

Goldman's research noted the trend of lower male participation in the U.S. workforce is long term, consistently below the rate of male participation in other economies since at least 1998. But the gap 20 years ago was less than 2 percentage points.

Another contributor to the gap can be traced to opioid use, estimated at 6 percent of the U.S. population versus slightly more than 3 percent in Australia and 1 percent or less in the U.K., Sweden, Germany and Belgium, the Goldman research noted.

Globally, labor force participation has seen the lasting effects of technology and trade cutting into participation. Machines have replaced lower-skilled or less-educated workers. And global trends such as increases in family income have lowered the labor supply in many developed markets.

But, Goldman said, the U.S. stands out. In addition to higher incarceration and opioid use rates, the U.S. has less supportive retaining and job-search assistance policies. It spends 0.3 percent of its economic output on active labor market policies compared with the average of 1.3 percent by other developed economies, according to data by the Organization for Economic Cooperation and Development cited in the research.

Even though the incarceration rate peaked 10 years ago, the effects are still rippling through the U.S. economy, Goldman said. "It will likely take many years before we see a corresponding decrease in the number of former prisoners, mostly because prisoners tend to be young, with a median age in the mid-30s," Struyven wrote in the note.

Prescription opioid use is also down since 2012, the paper noted, citing data from the CDC. But the same data show a shift to heroin and other illegal opioids and a steady rise in drug-related deaths.

— With reporting by Michael Bloom