This article was written through collaboration between The New York Times and ProPublica, the independent, nonprofit investigative journalism organization.

Not all drug prices are going up.

Amid the public fury over the escalating costs of brand-name medications, the prices of generic drugs have been falling, raising fears about the profitability of major generic manufacturers. Last week, Teva Pharmaceuticals reported that it had missed analysts’ earnings estimates in the second quarter and planned to lay off 7,000 workers. Its share price plummeted 24 percent in one day as investors worried there was no end in sight.

Share prices of other generic drugmakers also declined, as did those of wholesalers, which profit from the sales of generic drugs and have said they expect prices to continue declining.

Mylan, another large generic drugmaker, will report its second-quarter earnings on Wednesday. Mylan also sells the EpiPen, the brand-name allergy treatment whose price increases have stoked outrage over the past year, but the company’s primary business is as a seller of generic drugs.