Many were ineligible or decided against taking the medications due to potential side effects and the high cost, a study has found.