Introduction

Type 2 diabetes mellitus (T2DM) affects a substantial portion of the global population, with its prevalence rapidly increasing, particularly in low- and middle-income countries (LMICs). Recent data from the IDF Diabetes Atlas reveal that nearly 81% of the 537 million adults aged 20–79 years diagnosed with diabetes in 2021 were residents of LMICs, including various countries in the Middle East. T2DM places a considerable burden on patients and healthcare providers worldwide, largely due to its many complications1. Strict blood glucose management through glucose-lowering medications is recognized as an effective approach to reduce long-term risks, such as nephropathy, retinopathy, neuropathy, and all causes of mortality2,3. However, the threat of hypoglycemia, as a well-known side effect of insulin therapy, significantly limits the use of insulin or insulin secretagogues4.

Predicting hypoglycemic events in T2DM remains challenging, as these episodes are driven by multiple factors and show considerable variability in T2DM. Certain conditions, such as advanced age, female sex, chronic kidney disease, depression, and cognitive impairment, are known to increase an individual’s susceptibility to hypoglycemia5,6.

In individuals with T2DM using insulin or sulfonylureas, the frequency of hypoglycemic events is estimated at around 2.0 events/100 person-years. Moreover, each hypoglycemic event not only carries its own physical and psychological consequences but also increases the likelihood of future events7.

These events are associated with a greater risk of dementia, adverse cardiovascular events, and mortality. They also prompt fear and anxiety, which undermine diabetes self-management and severely impact patients’ quality of life. Despite these serious consequences, hypoglycemia remains the most preventable event among common diabetes-related complications8,9.

Most studies focus on severe hypoglycemia, which often leads individuals to seek medical attention at healthcare facilities. Yet, many vulnerable patients experience level 1 and level 2 hypoglycemia, which may not prompt hospital visits but still significantly affects their health and daily lives10,11,12. Recent guidelines suggest diabetic individuals detect levels 1 and 2 of hypoglycemia, as well as asymptomatic and natural hypoglycemia, by continuous glucose monitoring (CGM) systems as effective self-management tools13. CGM offers a significant advantage over traditional fingerstick-based self-monitoring of blood glucose (SMBG) by providing continuous data about blood glucose levels and their trends over time. However, due to the high cost of CGM systems, they remain unaffordable in the LMICs, which makes the diabetic population in these regions rely on SMBG to track their glucose levels14.

Historically, non-severe hypoglycemic events have been identified through retrospective self-reported questionnaires that depend on patients’ ability to recognize their symptoms15. The present study addressed this limitation by adopting a prospective design, which allows for a more objective collection of data on hypoglycemic episodes. There is also limited knowledge of how various aspects of diabetes management, such as lipid profiles and HbA1c levels, impact the incidence of hypoglycemia. By exploring these relationships, the study offers valuable insights for clinical care.

Machine learning (ML) methods have shown strong performance in disease modeling and classification, which has sparked growing interest among clinicians16,17. In the context of hypoglycemia prediction in individuals with T2DM, Agraz et al. have used ML algorithms on a dataset mostly related to white ethnics. They applied only a limited number of variables for model development, and the two proposed models in the study did not achieve high performance in terms of certain metrics18. While other studies have developed high-performing models using electronic health records from hospitalized patients, these models are not directly applicable to the daily lives of individuals with T2DM19,20. In contrast, our prospective cohort study of outpatients, though based on a smaller dataset, employs an explainable ML approach to identify and understand the key factors influencing hypoglycemia in everyday settings.

The complex mathematical processes behind ML approaches can make their decision-making hard to interpret. To address this issue, the SHapley Additive exPlanation (SHAP) method has emerged as a valuable tool for explaining ML model predictions at the individual level, enabling the visualization of how specific feature values influence the model’s outputs21.

In this prospective study, we applied ML models combined with interpretable methods to identify the most critical biochemical and clinical predictors of hypoglycemia in individuals with T2DM from a Middle Eastern country. We aimed to provide robust predictive performance while also clearly interpreting the relationships between these predictors and hypoglycemic outcomes. An overview of the study workflow is presented in Fig. 1.

Fig. 1
figure 1

The study workflow.

Methods

Study population

This prospective study was conducted at the Yazd Diabetes Research Center in Iran, a specialized outpatient clinic dedicated to the follow-up care of individuals with diabetes. Adults with a prior diagnosis of T2DM who visited the center for routine follow-up between November 2022 and May 2023 were included. Eligibility criteria required an age above 30 years, at least 12 months since T2DM diagnosis, and no documented history of cognitive impairment or dementia. Exclusion criteria encompassed serious complications (e.g., severe diabetic foot or advanced cardiopulmonary failure), pregnancy, irregular attendance noted in medical records, hospitalization or receiving new medications during the study follow-up, or any changes in diabetes management. Examples of management changes included modifications to the type or dose of oral antidiabetic medications, adjustments to insulin type or dose, or a switch from oral medications to insulin therapy during the last specialist visit.

Ethical statement

This investigation was carried out in accordance with the Declaration of Helsinki and approved by the Ethics Committee of Shahid Sadoughi University of Medical Sciences (Ethics No.: IR.SSU.REC.1400.256). Written informed consent was obtained from all participants.

Definition of hypoglycemia

According to the American Diabetes Association, hypoglycemia is divided into three levels. Level 1 is defined as a measured glucose level between 54 mg/dl (3 mmol/L) and 70 mg/dL (3.9 mol/L), even when no symptoms are observed. Level 2 is marked by a glucose level below 54 mg/dL (3 mmol/L), which is the recognized threshold for neuroglycopenic symptoms. Level 3 is a severe episode with altered mental or physical functioning that requires external assistance, regardless of the measured glucose level22.

Data collection

Experienced nurses provided guidance to each participant on recognizing hypoglycemia-related symptoms. Upon experiencing such symptoms, participants were instructed to use their SMBG devices to measure blood glucose levels before starting any self-treatment, except in cases of level 3 episodes that required immediate help. They recorded all events classified as level 3 or any episode with a blood glucose reading below 70 mg/dL using a personalized recording method, either on paper or electronically, that included the date and corresponding glucose level. Data from the SMBG devices, which stored information from approximately 1000 recent tests or the associated mobile application on participants’ smartphones, was used to verify self-reported non-severe events. Participants returned to the center three months after their initial visit to report their recorded hypoglycemic episodes.

Blood samples were drawn after an eight-hour fast to measure parameters such as HbA1c, total cholesterol, triglycerides, and serum creatinine (for the calculation of eGFR using the CKD-EPI equation).

We selected clinical and biochemical features with the highest relevance to hypoglycemia in individuals with T2DM by combining clinical expertise with evidence from previous studies23,24,25,26. Specifically, the study included nine variables: age, sex, diabetes duration, treatment type (insulin versus oral medications), BMI, eGFR, HbA1c, triglycerides, and total cholesterol.

Model development

Some features in the dataset showed randomly occurring missing values, each accounting for less than 20% of the data. To address these missing values, we employed the IterativeImputer method27. No significant correlation was observed between any pair of features (Figure S.1), which indicates the data set’s suitability for use in a ML workflow.

The dataset was divided into training and test sets using a 70:30 split through a stratified random sampling approach to ensure that each set maintained balanced class proportions. Each patient was assigned exclusively to one set to prevent any overlap between the training and test datasets. The training set supported model development, and the test set was used for internal validation. To ensure consistency in the measurement units of clinical features and to reduce potential bias during training and prediction, the StandardScaler method was employed. This technique standardizes the data, resulting in each variable having a mean of 0 and a standard deviation of 1.

To predict hypoglycemic episodes, we developed five supervised machine learning classifiers: logistic regression (LR), K-nearest neighbor (KNN), support vector machine (SVM), random forest (RF), and eXtreme gradient boosting (XGBoost). Each model was trained using the training dataset, with hyperparameter optimization via the GridSearchCV approach. This process employed a fivefold, 10-repeated RepeatedStratifiedCV to ensure robust parameter selection. During tuning, we optimized the area under the receiver operating characteristic curve as the primary performance metric.

We evaluated five candidate models using a tenfold cross-validation approach on the test set. The performance of each model was assessed using the Area Under the Precision-Recall Curves (AUPRC), F1-score (the harmonic mean of precision and recall), the Area Under the Receiver Operating Characteristic Curve (AUROC), accuracy, and the Brier score. The Brier score of a model measures the mean squared difference between predicted probabilities and actual outcomes; thus, a lower score shows a better agreement between predictions and observations.

ROC curves and precision-recall curves of the models were plotted at equal error rate. AUROC scores between models were compared through DeLong’s tests. Pairwise comparisons for other metrics among the models were performed by the bootstrapping method with 1000 replicates.

Model explanation

The SHAP method was applied to interpret the final model’s predictions. This technique quantifies the impact of each feature on hypoglycemic episodes, clarifying how different factors contribute to the model’s outputs.

Statistical analysis

All ML workflows were executed in Python version 3.11.7 (https://www.python.org), along with scikit-learn (version 1.6.1), Pandas (version 2.2.3), and NumPy (version 2.1.3) packages. Continuous variables were reported as medians (interquartile ranges) and compared between the two outcomes using the Mann–Whitney U test. Categorical variables were expressed as frequencies (percentages) and analyzed using the Chi-square test. A two-tailed P-value less than 0.05 was considered statistically significant.

Results

Participant characteristics

Of the 1537 volunteers initially enrolled, 212 (13.79%) were lost to follow-up because of undocumented hypoglycemic events or an unwillingness to continue. Nineteen persons (1.23%) were excluded due to receiving new medications or hospitalization. Finally, 1,306 participants were retained for analysis. Among the total cohort, 684 (52.37%) were female, and 622 (47.63%) were male. The cohort’s characteristics, according to the presence or absence of hypoglycemia, are summarized in Table 1.

Table 1 Comparison of characteristics between hypoglycemia and non-hypoglycemia groups.

Hypoglycemia episodes

During three months of follow-up, 419 out of 1,306 participants (32.08%) experienced at least one hypoglycemic episode. Among them, 397 (30.3%) had only nonsevere episodes, whereas 22 (1.78%) reported severe hypoglycemia for at least one episode.

Information about oral antidiabetic medications and insulin therapy for the hypoglycemia and non-hypoglycemia groups is shown in Table 1. Individuals on insulin therapy were classified as receiving intensive insulin therapy (IIT) if they used either basal-bolus regimens (multiple daily injections) or premixed insulin regimens administered two or three times per day.

The hypoglycemia group received significantly more IIT or sulfonylureas compared with the non-hypoglycemia group. The percentage of those receiving basal insulin alongside oral medications did not significantly differ between the two groups. Individuals treated only with DPP4 inhibitors and/or SGLT2 inhibitors did not report any hypoglycemic events.

Model development and performance comparison

Table 2 presents the performance metrics of the RF, XGBoost, SVC, LR, and KNN. It is important to note that, unlike the other metrics, where higher values indicate better performance, a lower Brier score signifies improved performance. This score numerically represents how accurately a model is calibrated. The calibration curve for each model illustrates the mapping of the model’s predictions to the actual outcomes.

Table 2 Performance metrics of the five classifier ML models (mean ± standard deviation (95%CI)).

The top three models were identified as RF, XGBoost, and SVC. Table 3 presents the results of pairwise statistical tests comparing the metrics among these models. The findings indicated that RF and XGBoost outperformed SVC with respect to both the AUPRC and the Brier score.

Table 3 P-values for pairwise comparisons among the top three best-performing models (RF, XGBoost, SVC).

Figure 2 shows ROC curves, Precision-recall curves, and calibration curves of all the models. In terms of AUROC values, pairwise DeLong tests confirmed that there was no statistically significant difference among the first three models: RF (AUC = 0.94 ± 0.01), XGBoost (AUC = 0.94 ± 0.01), and SVC (AUC = 0.93 ± 0.01). When we consider the balance between false positives and false negatives, the equal-error-rate (EER), RF outperformed the others with a misclassification rate of 14%. In comparison, both XGBoost and SVC had misclassification rates of 16%. This indicates that, on average, RF misclassified fewer cases than the other two models when equal weight is given to errors.

Fig. 2
figure 2

Performance comparison of the models for predicting hypoglycemia. A: The ROC curve, with the AUC score presented as Mean ± SD and shaded areas representing the upper and lower 95% confidence intervals. Equal Error Rates (EER) are indicated with “,” where the rate of false positives is equal to the rate of false negatives. B: The precision-recall curves, with AUPRC shown as Mean ± SD and shaded for the upper and lower 95% confidence intervals, similarly indicating Equal Error Rates with “.” C: The calibration curves, with the Brier score represented as Mean ± SD along with 95% confidence intervals (CI).

On precision–recall curves, RF and XGBoost achieved the highest AUPRCs, 0.88 ± 0.05 and 0.89 ± 0.02, respectively. A non-parametric bootstrap test showed no significant difference between these values. We then located the threshold at which precision equals recall. At this point, RF reached 81% precision and 81% recall, while XGBoost reached 77% for both. Thus, although their overall AUPRCs are nearly identical, RF offered a slightly better balance of precision and recall when errors are weighted equally.

Calibration curves alongside Brier scores are shown in Fig. 2C. The RF model achieved the best Brier score of 0.090 ± 0.012, closely followed by the XGBoost model, which scored 0.094 ± 0.013. However, the difference in performance between these two models was not statistically significant.

Table 3 shows that there was no statistically significant difference between the RF and XGBoost models across different metrics. Nevertheless, because the RF model demonstrated better EER in both the ROC curves and precision-recall curves, it was selected for subsequent analyses. Despite this, the same interpretation methods applied to the RF model were also used for the XGBoost model, and the results are provided in the Supplementary file.

The high AUC (0.94 ± 0.01) of the RF showed that the model distinguishes reliably between hypoglycemic and non-hypoglycemic cases, and the strong Brier score (0.090 ± 0.012) demonstrated that the predicted probabilities match actual outcomes well. These metrics provide confidence in the SHAP-based feature importance ranking.

The confusion matrix of the RF model was illustrated in Fig. 3.

Fig. 3
figure 3

Confusion Matrix of the Random Forest classifier. (A) Confusion matrix illustrating the classifier’s ability to correctly predict true positive and true negative outcomes, along with misclassifications.

Importance of covariates

We used the SHAP method to interpret the final RF model’s predictions by measuring each variable’s contribution to the outcome. When the RF model was applied to SHAP analysis, it enabled us to identify and interpret the most important risk factors for hypoglycemic events. In practical terms, the SHAP-derived feature importance provides clinicians with insights into which variables most strongly influence the risk of hypoglycemia. To assess the reliability of this ranking system, we applied Permutation Importance, a method for feature importance ranking, to the RF model.

The SHAP summary plot (Fig. 4) ranks features in descending order based on their average absolute SHAP values, each point representing an individual sample. Point color indicates the feature value, where warmer colors (red) indicate higher values and cooler colors (blue) denote lower values. The SHAP dependence plots (Fig. 5) illustrate how the actual value of each feature relates to its SHAP value. Positive SHAP values mean that the feature’s actual value increases the likelihood of hypoglycemia.

Fig. 4
figure 4

Model explanation by the SHAP method. SHAP summary plot of the RF model shows the overall importance of features and their impact on model predictions. Red dots represent higher feature values, except for the “Insulin therapy” and “Female” features, where red dots indicate the presence of insulin therapy and female gender, respectively.

Fig. 5
figure 5

SHAP dependence plots of the RF model for the most important covariates. They show how individual features and their interactions influence model outputs. (A) Diabetes duration; (B) eGFR; (C) Age; (D) HbA1C.

A comparison of the SHAP summary plots for the RF model (Fig. 4) and the XGBoost model (Figure S.2), along with the results from applying permutation importance to the RF (Table 4) and XGBoost (Table S.1), identified the five most important common predictors. These predictors were insulin therapy, diabetes duration, eGFR, age, and HbA1c levels, respectively.

Table 4 Results of permutation importance method applied to the RF model.

Diabetes duration exceeding 13.7 years, eGFR levels below 60.2 mL/min/1.73 m2, age older than 59 years, and HbA1c levels below 10% were more associated with an increased risk of hypoglycemia.

However, the RF and XGBoost showed different orders of importance for the other covariates; both agreed that female gender and lower levels of triglycerides and total cholesterol elevated the probability of hypoglycemia (Fig. 3 and Figure S.2).

Discussion

This prospective study evaluated and compared various ML models to analyze hypoglycemia events in the daily lives of individuals with T2DM receiving outpatient care. By leveraging a robust ML prediction model in conjunction with routine laboratory assessments, we identified and ranked a set of risk factors associated with hypoglycemia.

Our investigation was based on SMBG devices, including glucometers, test strips, and lancets. Although this method is less reliable than CGM systems, it is more available and affordable in LMICs because CGM systems are not widely supplied by governments or found in private pharmacies in these regions14. Additionally, recent meta-analyses have shown that while CGM systems can improve overall glycemic control and lead to a significant reduction in HbA1C levels among individuals with T2DM, they do not show a significant advantage in detecting severe hypoglycemic events or in reducing glucose variability when compared with SMBG devices. Also, CGM has been associated with an increased risk of certain adverse events, including symptoms at the sensor insertion site, infections, headaches, and gastrointestinal issues28,29. Altogether, these findings suggest that using SMBG devices is a valuable approach for capturing symptomatic hypoglycemic events in the diabetic population of middle-income countries.

Incidence of hypoglycemia

After a three-month follow-up period, 30.3% of participants reported at least one non-severe hypoglycemic episode, while 1.78% experienced at least one severe event. This rate is lower than what has been reported in previous studies with similar follow-up durations in Europe30,31. In the Middle East region (Israel, Lebanon, and Saudi Arabia), the HAT study found a 39.1% rate of hypoglycemia in patients with type 2 diabetes over four weeks32. Differences in study design may explain our lower estimates. Specifically, the HAT population consisted entirely of insulin-treated patients, whereas most of our participants were on oral antidiabetic medications. Additionally, our participants were asked to self-monitor blood glucose before recording a hypoglycemic event, which likely improved the accuracy of our data. Moreover, during the study period, none of our participants required hospitalization or started any new medications that could have affected their glycemic control.

Importance of covariates

The results of this study showed that insulin treatment, diabetes duration, and eGFR are the two most important predictors of hypoglycemia, followed by age and HbA1C. These factors have also been identified as important predictors in a CGM-based cohort study33.

The present study found that individuals with a history of T2DM exceeding 13.7 years demonstrated a higher likelihood of experiencing hypoglycemia. This association has been consistently reported in both SMBG and CGM-based studies25,26,34. Recent ML modeling using data from CGM systems introduced this factor as a significant demographic predictor for hypoglycemia35. Participants with a longer duration of T2DM are more likely to receive multiple daily insulin injections, a well-established cause of hypoglycemia36.

Impaired renal function is another major contributor to hypoglycemia occurrence, as reported in SMBG-based investigations24,25,37,38. Reduced eGFR changes the metabolism and clearance of diabetic medications, leading to prolonged retention and action of insulin or insulin secretagogues in the body39. Additionally, conditions frequently associated with impaired renal function, such as anorexia, malnutrition, and chronic or recurrent infections, further elevate the likelihood of hypoglycemic events by compounding the body’s inability to maintain stable glucose levels40,41.

In this study, eGFR was the third significant risk factor, with values below 60.2 mL/min/1.73 m2 substantially increasing the probability of hypoglycemia. A previous study based on the CGM method indicated that eGFR below 45 mL/min/1.73 m2 was associated with higher hypoglycemia risk42, while another CGM-based study reported 60 mL/min/1.73 m2 as a threshold for this factor43. Our finding aligns with a large cohort study of individuals with T2DM, which identified eGFR levels below 60 mL/min/1.73 m2 as an independent predictor of outpatient hypoglycemia events38. This threshold has been recognized by the American Diabetes Association Professional Practice Committee as a risk factor for hypoglycemia13, further validating the robustness of our ML model and its outcomes.

We found that HbA1C levels exceeding 10% were associated with a reduced frequency of self-reported hypoglycemia. Research on the relationship between HbA1c and hypoglycemia has produced mixed findings; some studies suggested that lower HbA1c levels increase the risk of hypoglycemia44, while others reported the opposite or found no significant association26,30,45. This study suggested that elevated HbA1c levels (> 10%) may be linked to impaired awareness of hypoglycemia (IAH), a condition marked by a diminished ability to detect hypoglycemic symptoms and a reduced sympathetic response to low blood glucose, thereby masking typical adrenergic signs.

Patients with poor metabolic control usually require complex insulin regimens and experience rapid rises in blood insulin concentration over a short period. This results in the storage of large amounts of glucose, followed by hypoglycemia46. Repeated episodes of hypoglycemia impair counterregulatory mechanisms, disrupt the release of key hormones, and weaken the sympathoadrenal response47, which causes IAH to become a persistent complication of such therapy48.

Recurrent hypoglycemia, a high daily pill burden, and complex treatment protocols are known predictors of poor treatment adherence among those with T2DM49. Patients with poor medication compliance have demonstrated more susceptibility to IAH50. A similar rationale may explain the lipid profile data, where elevated triglycerides and total cholesterol levels were associated with fewer reported hypoglycemia events. This trend could suggest poor treatment adherence and the reinforcement of IAH in this subgroup. Consistent with these findings, Mellor et al. reported that lower triglyceride and total cholesterol levels were associated with more frequent hypoglycemia events in their model based on a large population25.

In this study, participants aged over 59 years experienced a higher incidence of hypoglycemia episodes. Notably, individuals aged 81 years and older reported fewer occurrences of hypoglycemic events. This finding suggests that the older subgroup may have a diminished ability to recognize hypoglycemic symptoms, likely due to reduced bodily sensitivity to stimulation47,51.

The final RF model identified BMI as a less important predictor for hypoglycemia. Different studies have reported mixed findings on the relationship between BMI and hypoglycemia. For example, the UKPDS trial observed more frequent hypoglycemia in non-obese participants52, whereas the PREDICTIVE™ study associated lower BMI with an increased incidence of hypoglycemia53. Conversely, Malkani et al. found no significant association between BMI and hypoglycemia during a 3-month study period24. We found individuals with a BMI higher than 34 kg/m2 reported fewer events. The attenuated response of the autonomic nervous system reduced sympathetic activation, and diminished parasympathetic inhibition in individuals with obesity and high insulin resistance may act as a buffer against sudden glucose fluctuations, potentially preventing symptomatic hypoglycemia triggered by sharp glucose declines. Furthermore, a higher glycemic setpoint, which reduces the likelihood of reaching critically low glucose levels, along with an exaggerated cortisol and glucagon response during hypoglycemia, could decrease the perception of classic hypoglycemia symptoms54.

Our findings showed the female gender as a weak risk factor. A previous study utilizing CGM also found that gender plays a minimal role in predicting hypoglycemia35. The result is similar to reports suggesting females have a higher risk of experiencing hypoglycemia5,55,56,57. One possible mechanism for the higher risk in females is their weaker counterregulatory response to hypoglycemic episodes compared to males58. Factors like socioeconomic status, study participation patterns, comorbidities, or concurrent medications may play a role in the sex-based differences in hypoglycemia risk and warrant further exploration.

Strengths and limitations

This is the first prospective study conducted in Iran to investigate hypoglycemia in the T2DM population. We did not rely on questionnaires, which are subject to recall bias. Instead, participants were educated to recognize hypoglycemic symptoms and instructed to perform SMBG before recording any hypoglycemic events. The study developed an ML model to assess the importance and effect of different risk factors on the occurrence of hypoglycemia.

The reliability of self-reported hypoglycemia in this study depended on participants’ understanding of hypoglycemia symptoms and their use of personal glucometers to document episodes. Despite comprehensive education provided during the study, individual variations in symptom awareness and interpretation could have influenced reporting accuracy. Additionally, because CGM systems are largely unavailable and unaffordable in LMICs, we relied on SMBG readings, which may have missed asymptomatic or nocturnal events. In future work, however, applying advanced machine-learning methods to reconstruct virtual CGM profiles prospectively—from the very start of data collection—could not only enhance detection accuracy but also help interpret threshold effects more reliably59.

The lack of data on participants’ prior hypoglycemia experiences represented a limitation, as we did not collect this information due to concerns about the reliability of their recollection and understanding.

Since the patients did not receive any new medications during the three-month follow-up, no significant changes in their lipid profiles and serum creatinine levels were expected. Thus, second-visit laboratory tests were used for analysis in this study.

The final ML model demonstrated good performance scores; however, the absence of an external dataset limited our ability to perform external validation, leaving us reliant solely on internal validation. This constraint may have influenced the generalizability of our findings.

The investigation of IAH was not a primary objective of this study. We did not use specific questionnaires or tools designed to assess IAH, which limits the conclusions that can be drawn about its association with the covariates analyzed. Future research should use targeted assessments to further explore these relationships and validate the hypotheses generated by this study.

Conclusion

The analysis revealed that hypoglycemia was more frequently reported in those with intensive insulin therapy, a diabetes duration exceeding 13.7 years, and eGFR below 60.2 mL/min/1.73 m2. Other covariates, such as age, HbA1C, triglycerides, total cholesterol, and BMI, showed weaker, threshold-dependent effects on hypoglycemia. Also, the female gender was weakly related to hypoglycemia events.