Methods
We emulated a target trial using a multi-institutional electronic health record database (TriNetX) to assess the risk of hypomagnesemia among patients initiating SGLT2 inhibitors, GLP-1 RAs, or DPP4 inhibitors between 2016 and 2023. Three pairwise comparisons were conducted: (1) SGLT2 inhibitors vs. DPP4 inhibitors, (2) GLP-1 RAs vs. DPP4 inhibitors, and (3) SGLT2 inhibitors vs. GLP-1 RAs. A 1:1 propensity score matching approach was applied to balance baseline characteristics. Patients were followed from treatment initiation until hypomagnesemia (defined as an ICD-10 diagnosis of E83.42 or serum magnesium levels < 1.80 mg/dL), death, loss to follow-up, or study end (September 14, 2024). Cox proportional hazards models were used to estimate the relative risk of hypomagnesemia.
Results
After propensity score matching, 316,614 matched pairs were included in the SGLT2 inhibitor vs. DPP4 inhibitor cohort, 290,069 in the GLP-1 RA vs. DPP4 inhibitor cohort, and 290,065 in the SGLT2 inhibitor vs. GLP-1 RA cohort. Baseline characteristics were well balanced. Initiation of SGLT2 inhibitors was associated with a significantly lower risk of hypomagnesemia compared with both DPP4 inhibitors (hazard ratio [HR]: 0.81, 95% confidence interval [CI]: 0.80–0.82) and GLP-1 RAs (HR: 0.87, 95% CI: 0.86–0.89). Similarly, GLP-1 RA use was associated with a lower risk of hypomagnesemia compared with DPP4 inhibitors (HR: 0.92, 95% CI: 0.91–0.93). These associations were consistent across subgroups stratified by age, sex, and hemoglobin A1c levels. A reduced risk of hypomagnesemia was observed across individual agents within the SGLT2 inhibitor (canagliflozin, dapagliflozin, and empagliflozin) and GLP-1 RA (dulaglutide, liraglutide, and semaglutide) classes compared with DPP4 inhibitors.
Conclusions
Among patients with type 2 diabetes, treatment with SGLT2 inhibitors and GLP-1 RAs was associated with a lower risk of hypomagnesemia compared with DPP4 inhibitors. These findings suggest that SGLT2 inhibitors and GLP-1 RAs may be preferable options for patients at risk of hypomagnesemia.