Among the classification variables, age group, city-type, and CNNM2 rs3740393 gene subgroup were all protective factors of magnesium deficiency. Here, CNNM2 is linked to nutritional disorder.