Diabetes, a major non-communicable disease, presents challenges for healthcare systems worldwide. Traditional regression models focus on mean effects, but factors can impact the entire distribution of responses over time. Linear mixed quantile regression models (LQMMs) address this issue. A study involving 2791 diabetic patients in Iran explored the relationship between Hemoglobin A1c (HbA1c) levels and factors such as age, sex, body mass index (BMI), disease duration, cholesterol, triglycerides, ischemic heart disease, and treatments (insulin, oral anti-diabetic drugs, and combination). LQMM analysis examined the association between HbA1c and the explanatory variables. Associations between cholesterol, triglycerides, ischemic heart disease (IHD), insulin, oral anti-diabetic drugs (OADs), a combination of OADs and insulin, and HbA1c levels exhibited varying degrees of correlation across all quantiles (p < 0.05), demonstrating a positive effect. While BMI did not display significant effects in the lower quantiles (p > 0.05), it was found to be significant in the higher quantiles (p < 0.05). The impact of disease duration differed between the low and high quantiles (specifically at the quantiles of 5, 50, and 75; p < 0.05). Age was discovered to have an association with HbA1c in the higher quantiles (specifically at the quantiles of 50, 75, and 95; p < 0.05). The findings reveal important associations and shed light on how these relationships may vary across different quantiles and over time. These insights can serve as guidance for devising effective strategies to manage and monitor HbA1c levels.