Sixteen percent of Massachusetts residents stopped taking medication in 2016 as prescribed because of its cost, according to figures the AARP released Thursday.

As part of its nationwide "Stop Rx Greed" campaign, the AARP published a series of state-by-state infographics showing the five-year price increase for three drugs that treat cancer, diabetes and heart disease, as well as the number of residents in each state diagnosed with those conditions.

In Massachusetts, 660,525 residents have been diagnosed with cancer, 581,680 with diabetes or pre-diabetes, and 196,320 with heart disease, the AARP said.

"While prescription drug prices continue skyrocketing, Americans are being forced to choose between filling life-saving medications or paying rent and buying food," said AARP Massachusetts director Mike Festa. "So far in 2019, 29 states have passed 46 new laws to rein in drug prices. It's critical that state and federal lawmakers continue this momentum to stop Rx greed."

Several drug pricing and transparency bills are pending before the Legislature's Health Care Financing Committee, and the AARP earlier this month praised drug pricing provisions in this year's state budget.