Introduction

Magnesium is the second most abundant intracellular electrolyte and plays a significant role in essentially every biologic function within the cell [1]. It is important for bone and mineral metabolism, as well as for regulating vascular tone and heart rhythm [2, 3]. Magnesium does not appear to be controlled by any hormonal systems. Rather, the regulation of magnesium balance is dependent on intestinal absorption and renal excretion. Given the essential role of the kidneys in maintaining magnesium homeostasis, abnormalities in magnesium levels, including hypomagnesemia and hypermagnesemia, are not uncommon in patients with chronic kidney disease (CKD).

Hypomagnesemia in CKD is usually the result of medication use [4] such as diuretics, calcineurin inhibitors or proton pump inhibitors [5] but it can also be caused by associated conditions like diabetes or volume expansion [6]. Hypomagnesemia has been investigated in non-CKD, CKD, and end stage renal disease (ESRD) patient populations and has been found to be associated with increased mortality [1, 7, 8], notably increased cardiovascular mortality [9]. Hypomagnesemia has also been linked to a worsening rate of decline in eGFR, though this has not been clearly established [7, 10].

Hypermagnesemia in CKD is the result of decreased Glomerular Filtration Rate (GFR). Since urinary excretion is the primary magnesium regulatory system, plasma magnesium levels rise as renal function decreases [11]. The relationship between hypermagnesemia and mortality is not as clear. Some studies suggest that mild elevations in serum magnesium levels are associated with a survival advantage [7, 12,13,14]. There are no studies examining the associations between hypermagnesemia and CKD progression.

Our study examines the association between serum magnesium levels, all-cause mortality and progression of CKD in a large cohort of CKD patients.

Materials and methods

Patient population

We used the Cleveland Clinic CKD registry to evaluate the relationship between serum magnesium and outcomes. The CKD registry was developed from the electronic health records (EHR) and we have described the development and validation in detail in previously published work [15]. For this analysis, we included patients fulfilling the following criteria: a) had at least one in-person outpatient encounter with a Cleveland Clinic health care provider and at least two estimated glomerular fitration rate (eGFR) results < 60 ml/min/1.73 m2 taken more than 90 days apart from 2005 to 2014. (the second eGFR was 15–59.9 ml/min/1.73 m2 and patients were not on dialysis nor had a prior kidney transplant), b) had serum magnesium measured within the year prior to the date of second eGFR< 60 (CKD); and c) were residents of Ohio.

Patient characteristics

We extracted demographic information including sex, age, race, and insurance from the EHR. We used previously specified and validated criteria to define comorbidities including hypertension, diabetes mellitus, coronary artery disease, congestive heart failure, hyperlipidemia, and malignancy [15]. Baseline conditions were ascertained prior to the second eGFR < 60 ml/min/1.73 m2. We also obtained laboratory measurements (serum hemoglobin, albumin, bicarbonate and potassium) from the EHR. For laboratory results other than serum magnesium, we used the last outpatient laboratory result within 2 years prior to second eGFR < 60 ml/min/1.73 m2.

Kidney function

Our hospital measured serum creatinine in a clinical laboratory with a Hitachi D 2400 Modular Chemistry Analyzer (Roche Diagnostics, Indianapolis, IN). We used the CKD-EPI equation [16] to calculate eGFR. We classified CKD into the following stages: CKD stage 3a (eGFR 45–59 ml/min/1.73 m2), stage 3b (eGFR 30–44 ml/min/1.73 m2), and stage 4 CKD (eGFR 15–29 ml/min/1.73 m2)..

Serum magnesium

Serum magnesium was measured using the Gen.2 homogeneous enzymatic calorimetric assay on the Cobas C702 analyzer (Roche diagnostics). Serum magnesium was classified based on the normal ranged provided by the assay into the following categories: < 1.7, 1.7–2.6, and > 2.6 mg/dl. Magnesium data obtained within 1 year prior to second eGFR < 60 ml/min/1.73 m2 was included.

Ascertainment of death and its causes

We obtained mortality data from the EHR and through linkage of our registry with the Ohio Department of Health death records. The state death records contain causes of death coded according to the International Classification of Diseases, Tenth Revision (ICD-10). We grouped the underlying causes of death following the National Center for Health Statistics coding system, except for a modification explained here. We classified deaths into three categories: a) deaths from cardiovascular causes, b) deaths from malignancy, and c) deaths from other (non-cardiovascular and non-malignancy-related) conditions. We defined cardiovascular deaths as those due to diseases of the heart, essential hypertension, cerebrovascular disease, atherosclerosis, or other diseases of the circulatory system (ICD-10 codes I00–I78). Patients with death reported in the EHR but not found in Ohio mortality files were included in analyses of all-cause mortality and excluded from cause-specific analyses.

Statistical analysis

We compared baseline characteristics between patients with and without magnesium data, and also among patients with different magnesium levels using Chi-square and ANOVA and Kruskal-Wallis tests for categorical and continuous variables, respectively. We summarized the leading causes of death for various magnesium categories as percent of total deaths observed. We estimated survival over time by magnesium level using Kaplan-Meier survival estimates. We evaluated the relationship between magnesium levels and overall mortality using a Cox proportional hazards model and the relationship between magnesium level and cause specific death categories using competing risks regression models as described by Fine and Gray. We adjusted the models for the following covariates: sex, age, race, diabetes, hyperlipidemia, hypertension, coronary artery disease, congestive heart failure, cerebrovascular disease, malignancy, body mass index, albumin, hemoglobin, calcium, serum bicarbonate, potassium, magnesium supplement, proton pump inhibitors, insurance group, ACEI (Angiotensin Conversion Enzyme Inhibitors) /ARB (Angiotensin Receptor Blockers), beta blockers, diuretics, smoking and eGFR. We used splines to relax linearity assumptions as necessary.

Approximately 5% of patients were missing Body Mass Index (BMI), albumin or hemoglobin data, < 0.1% were missing bicarbonate, potassium or calcium data, 23% were missing smoking status, and 6% did not have insurance data. We used multiple imputation (SAS proc. MI) to impute data in 2 steps. In the first step we used the Markov Chain Monte Carlo method and a single chain to impute 5 datasets with complete continuous and binary data. In the second step we imputed insurance group on each of the 5 datasets using discriminant function analysis15. We included the following covariates in the imputation: sex, age, race, diabetes, hyperlipidemia, hypertension, coronary artery disease, congestive heart failure, cerebrovascular disease, malignancy, body mass index, albumin, hemoglobin, calcium, serum bicarbonate, potassium, magnesium supplement, insurance group, ACEI/ARB, beta blockers, diuretics, smoking and eGFR. We ran all models on each of the 5 imputed datasets, and then combined parameter estimates using SAS MI analyze.

We also evaluated the association between continuous magnesium and all-cause mortality using restricted cubic splines at percentiles 10, 50 and 90 in the Cox model. We graphed continuous magnesium vs. the log hazard using data from the first imputation. The graph estimates were calculated for a hypothetical patient with mean values on all baseline covariates. We evaluated two-way interactions on all-cause mortality between magnesium level and each of the following: eGFR, BMI group and potassium level. We conducted a sensitivity analysis to confirm the main mortality findings while excluding patients with history of malignancy.

To evaluate the slope of eGFR at different values of baseline magnesium, we used a mixed model analysis with subjects considered a random effect and tested the interaction between magnesium level and time (slope of eGFR over time) until patients reached eGFR< 20 or dialysis initiation or preemptive transplant or end of study or end of follow up. We iteratively tested the covariance structure for mixed models and selected our final model based on best fit as determined by the Akaike Information Criteria. An autoregressive covariance structure was used for the final model. We used the first eGFR per month for each patient. We adjusted for the covariates mentioned above. Wed fit the model on each of the 5 imputed datasets, and parameter estimates were combined using SAS MI analyze.

All analyses were conducted using Linux SAS version 9.4 (SAS Institute, Cary, NC), and graphs were created using R 3.5.1 (The R Foundation for Statistical Computing, Vienna, Austria). This study and the CKD registry were both approved by the Cleveland Clinic Institutional Review Board (IRB study number 09–015).

Results

Patient characteristics

From 2005 to December 2014, there were 73,693 patients with CKD stage 3 or 4 in the registry who were residents of Ohio (Figure 3 in Appendix). Of those, 10,568 had magnesium levels within the year prior to entry into the registry and qualified for this study. Patients who had magnesium measured were younger, more male, more African American, had lower BMI, less diabetes, more malignancy, less hypertension, more congestive heart failure, and lower eGFR compared to those that didn’t have magnesium measured (Table 4 in Appendix). The mean age was 68.7 ± 13.3 years, 47% were men, and 14% were blacks. Mean BMI of the study cohort was 29.2 ± 7 kg/m2. Prevalence of diabetes, malignancy, and coronary artery disease were 21, 27 and 20% respectively. Mean eGFR of the study population was 46.3 ml/min/1.73 m2. Table 1 outlines other details of the study population based on magnesium categories.

Table 1 Patient characteristics by baseline Magnesium level

Mortality

During a median follow up of 3.7 years, 4656 (44%) patients died; cause of death was available for 4599 patients. Among them, 1597 (34.7%) died of cardiovascular causes, 1292 (28.1%) due to malignancy, 1623 (35.3%) due to non-cardiovascular non-malignancy diseases and 87 due to other causes. Table 2 shows the causes of death differed across magnesium levels (p < 0.001).

Table 2 Causes of death by baseline Magnesium level

Magnesium and overall and cause-specific death

Kaplan-Meier survival estimates at 3 years were 68.5% (95% CI: 65.9, 71.3), 72.2% (71.2, 73.2) and 61.5% (55.1, 68.7) for low, normal and high magnesium respectively (P < 0.001, Fig. 1). In the multivariable models adjusted for all relevant confounding variables, magnesium level < 1.7 mg/dl (vs. 1.7–2.6 mg/dl) was associated with higher overall mortality (HR = 1.14, 95% CI: 1.04, 1.24), and with higher sub-distribution hazards for non-cardiovascular non-malignancy mortality (HR = 1.29, 95% CI: 1.12, 1.49) (Table 3). Magnesium level > 2.6 mg/dl 1 (vs. 1.7–2.6 mg/dl) was associated with a higher risk of all-cause death only (HR = 1.23, 95% CI: 1.03, 1.48). In the model for all-cause death we found no evidence of an interaction between magnesium level and any of the following: eGFR, BMI group or potassium level. Figure 2 shows the associations between magnesium (as a continuous measure) and all-cause mortality.

Fig. 1
figure 1

Kaplan-Meier survival estimates at 3 years for low, normal and high magnesium

Table 3 Association between magnesium level and mortality
Fig. 2
figure 2

Relationship between magnesium (as a continuous measure) and all-cause mortality. The graph shows a U-shaped association between continuous magnesium and mortality

Excluding patients with history of malignancy at baseline

In the sensitivity analyses excluding patients with malignancy (n = 7697), results were qualitatively similar to the primary analysis. Magnesium level < 1.7 mg/dl (vs. 1.7–2.6 mg/dl) was associated with higher overall mortality (HR = 1.16, 95% CI: 1.04, 1.29), and with higher sub-distribution hazards for non-cardiovascular non-malignancy mortality (HR = 1.37, 95% CI: 1.17, 1.61). Magnesium level > 2.6 mg/dl 1 (vs. 1.7–2.6 mg/dl) was associated with a higher risk of all-cause death only (HR = 1.27, 95% CI: 1.03, 1.55).

eGFR decline

There were 7248 patients with follow up eGFR that were included in this analysis, 927 with low magnesium, 6188 normal and 133 high. No significant differences in the slope of eGFR were found among magnesium level groups (Interaction P = 0.10). The group with low magnesium had slightly more negative or deleterious monthly slope of eGFR than the normal group, but the effect was not statistically significant (Parameter estimate = − 0.02, SE = 0.01, P = 0.05).

Discussion

In our study, we observed a U-shaped association between serum magnesium levels and mortality, with both hypomagnesemia and hypermagnesemia (HR = 1.23, 95% CI: 1.03, 1.48) demonstrating higher all-cause mortality. However, there was no association between serum magnesium levels and rate of eGFR decline.

Hypomagnesemia has been linked with increased all-cause mortality [7, 17]. In a recent meta-analysis of magnesium levels in CKD and ESRD patients, Xiong et al. reviewed 20 studies with more than 200,000 participants and showed a clear association between hypomagnesemia and all-cause mortality [18]. In particular, low magnesium seem to be associated with increased cardiovascular mortality and the proposed mechanisms include promoting hypertension, cardiac arrhythmias [19], cardiac remodeling / fibrosis [20], oxidative stress, insulin resistance and arterial stiffening [17, 21]. It has also been suggested that magnesium has anti-atherosclerotic effects, and that hypomagnesemia promotes calcification in vascular smooth muscle cells [22], as well as endothelial cell dysfunction [17]. Our findings are consistent with the literature whereas hypomagnesemia was indeed associated with increased mortality. However, we did not observe a higher risk of cardiovascular mortality specifically. This could be due to the fact that in our population, patients with hypomagnesemia were younger and had lower incidence of cardiovascular disease. Rather, we report a higher prevalence of non-cardiac, non-malignancy related death.

Conversely, the relationship between hypermagnesemia and mortality is not clearly established, whereas some studies suggest that hypermagnesemia confers a survival advantage in CKD patients, while others report an increase in mortality. An observational retrospective study of chronic hemodialysis patients suggested a survival advantage with slightly elevated serum magnesium levels, however, found that patients with significantly elevated magnesium levels ≥3.1 had higher mortality [17]. It is hypothesized that this may be due to over suppression of Parathyroid Hormone (PTH) with significant hypermagnesemia, and that iPTH < 50 pg/ml is associated with higher cardiovascular mortality [17]. This study did not include non-dialysis CKD patients, however. Other observational studies found that ESRD patients with arterial calcification, mitral annular calcification, and carotid intima-media thickness had lower serum magnesium levels on average, and therefore suggest that hypermagnesemia may play a protective role in this setting, however these studies did not examine survival [13]. However, other studies contradict those findings and show an association between hypermagnesemia and morbidity and mortality, notably in critically ill patients [23, 24]. Indeed, hypermagnesemia can lead to hypotension, cardiac conduction abnormalities, neuromuscular blockade and respiratory depression [25,26,27]. Our findings are in line with the latter set of studies whereas hypermagnesemia was associated with a higher prevalence of all-cause mortality. But there were no statistically significant differences in specific causes of death for patients with hypermagnesemia.

There are few studies that examine the effects of hypomagnesemia and hypermagnesemia on CKD progression. One study found that hypomagnesemia was associated with an annual eGFR decline of 9.6% when baseline serum magnesium level was 1 mg/dL below the population mean, 3.5% annual eGFR decline if the serum magnesium level was 1 mg/dL above the population mean, and 6.6% eGFR decline for the population mean, however the effect of magnesium lost significance after adjustment for covariates [17]. Proposed mechanisms for why hypomagnesemia may be responsible for accelerated eGFR decline include potentiating hyperaldosteronism, hypertension, endothelial dysfunction, and oxidative stress, which may lead to further kidney injury [17]. In our study, we compared the slope or rate of decline in eGFR between CKD patients with hypomagnesemia, normal magnesium levels, and hypermagnesemia and found that the association between magnesium group and slope of eGFR was not statistically significant in either the unadjusted (P = 0.14) or adjusted (P = 0.10) models, suggesting that different magnesium levels are not associated with a different rate of eGFR decline in CKD patients. However, we do note that the group with low magnesium levels had a slightly more negative slope than the normal group, but the effect was not statistically significant.

Strengths of our analysis include a large patient population with CKD stages 3–4, with data over several years, including a diverse patient population. However, retrospective analyses are prone to residual confounding. While we were able to control for multiple confounding variables that affect mortality, we were unable to adjust for patients on a calcimimetic, as well as for iPTH and phosphorous levels due to insufficient data. Additionally, we recognize that the patients who had their magnesium levels measured were different from those who did not and we realize this could bias our results. For example, serum magnesium appeared to be measured frequently in patients with malignancy and that could be driven by the known hypomagnesemic effects of several anti-cancer drugs. Unfortunately, we did not have data related to the use of cancer drugs, so we could not investigate this finding further. Finally, our patients have been followed in a single health care system, and therefore the data may not be generalizable.

Conclusion

In conclusion, hypomagnesemia and hypermagnesemia were both associated with increased mortality, demonstrating a U-shaped association between serum magnesium levels and mortality. Hypomagnesemia was associated specifically associated with increased non-cardiovascular, non-malignancy related death while hypermagnesemia did not demonstrate any cause specific mortality association. Magnesium levels are not associated with a difference in rate of eGFR decline in CKD patients.