Adherence to medication is a significant factor when preventing chronic diseases. When patients adhere poorly, physicians intervene to increase this adherence. Methods such as constant surveillance and reminding the importance of medications have shown a positive effect over adherence. Therefore, the literature has studied adherence to widely, considering demographics and patient’s medical factors. Moreover, we add factors associated with past adherence and surveillance frequency. Additionally, we include the randomness of patient’s attendance to appointments. We develop a dynamic logistic regression with random effects and apply our model to longitudinal data for lowering cholesterol medications in a large cohort of patients seen in the national Veterans Affairs health system.