In the linear analysis, serum magnesium levels were inversely associated with depression scores in the groups of CRP levels ≥ 5 mg/L (β = −0.50, 95% CI = −0.97, −0.03; p = 0.039) and of <5 mg/L (β = −0.17, 95% CI = −0.33, −0.00; p = 0.045). The gene discussed is CRP; the disease is depressive disorder.