U.S. investment in medical research has slowed down greatly over the past decade, and the research getting funded doesn’t match up to the health challenges facing the country, according to a new study.

Overall medical investment in the United States grew at just .8 percent per year between 2004-2012, a major slowdown from the 6 percent annual growth between 1994 and 2004, according to the study in the policy journal JAMA. The United States remains the dominant global funder of new medical research discoveries, but its lead — and the economic advantages that come with it — has been slipping. In the past 30 years, the country’s global share of research patents considered the most valuable dropped from 73 percent to 59 percent.

It’s not just that the investment is slipping, the authors argue. The funding priorities are leaving major research gaps. In all, 27 diseases account for 84 percent of U.S. mortality, but together they receive just 48 percent of funding from the National Institutes of Health. Some diseases, like cancer and HIV/AIDS, get funded at better rates than predicted based on the disease burden, while others like stroke and depression fall short, according to an analysis by study author Hamilton Moses III of Alerion Advisors. Research into migraines is particularly underfunded, even though 36 million Americans, or 12 percent of the population, suffer from migraine headaches, according to the American Migraine Foundation.

But the factors determining which areas get public funding depends on much more than actual need, Moses writes with Johns Hopkins School of Medicine researchers. There are issues like quality of research and infrastructure resources that influence these decisions.

Industry is meanwhile providing a much greater share of medical research in the United States — up from 46 percent in 1994 to 58 percent in 2012, according to the JAMA study. The NIH received a funding bump a decade ago that boosted its budget to about $35 billion, but between 2004 and 2012, its budget shrank by a 1.8 percent annual compound rate.