Introduction

According to the Dementia Epidemiological Survey conducted from 2011 to 2013 by the Taiwan Alzheimer’s Disease Association [1], the prevalence of dementia in adults over 65 years old in Taiwan is 8.0%, including 3.3% for very mild dementia and 18.8% for mild cognitive impairment (MCI). The prevalence increases with age: one in five adults 80 years and older have dementia. With the growing aging population in Taiwan, it is estimated that more than 460,000 people will have dementia in 2031 [1]. Because the aging population and increasing incidence of dementia represent a major healthcare and public health burden, it is important to identify factors that may prevent or delay the onset of cognitive impairment and dementia.

Nutrients and other dietary factors might play an important role in maintaining the normal physiological function of the brain [2] and delaying the progression of cognitive decline [3]. As the second most abundant intracellular cation, magnesium plays a critical role in more than 300 biological reactions including interaction with N-methyl D-aspartate receptors, maintenance of nerve membrane functions, and participation in neurochemical transmission and nerve transmission [4, 5]. These mechanisms play important roles in cognitive impairment and the development of dementia [4]. The major food sources of magnesium include leafy green vegetables, whole grain, nuts, and milk products [6]. Studies have also identified potential interactions between magnesium and other nutrients in maintaining their biological homeostasis. Magnesium plays an important role in the synthesis and metabolism of vitamin D; serum vitamin D can increase the intestinal absorption of magnesium [7, 8].

Dietary intake of magnesium varies in different populations. Taiwan has experienced a nutrition transition along with the rapid economic growth, the diet in Taiwan is still characterized by a high intake of fruits and vegetables including foods rich in magnesium. Previous studies have indicated that high intake of magnesium may be related to a reduced risk of cognitive impairment in older American adults with sufficient serum vitamin D status [13, 14]. However, findings from a few studies conducted in East Asian populations have shown mixed results on the association between magnesium intake and risk of dementia [15,16,17], but none of these studies adjusted for intake or serum level of vitamin D.

In this study, we evaluated both the cross-sectional and longitudinal associations between magnesium intake and cognitive performance while considering the possible interaction with circulating vitamin D in the Healthy Aging Longitudinal Study in Taiwan (HALST) study, a community-based study conducted in an older population with higher magnesium intake than that in the United States population.

Material and methods

The HALST study

The HALST is a prospective study of community-dwelling older adults (aged 55 and above) in which 5663 volunteers (2675 men and 2988 women) were recruited across Taiwan between 2009 and 2013. The cohort has been previously described [18]. The process of recruitment was summarized in the Supplementary Fig. 1. Briefly, a sample of eligible residents (≥ 55 years old) living within the catchment area of seven collaborative hospitals were recruited for the study (n = 22,563), of them 6985 (31%) subjects agreed to participate. Participants with any of the following conditions were excluded: highly contagious infectious diseases, diagnosed dementia, severe illness (based on the interviewers’ judgement of whether the participant was too ill to complete the interview), being bed-ridden, severe mental disorders, mutism, hearing impairment, blindness, or other conditions such as living in a long-term care facility or being hospitalized. Interviewers were trained to conduct face-to-face interviews using participants’ primary languages, which include Mandarin, Taiwanese, and Hakka. Among the 5,663 participants, 13 were excluded because of self-reported diagnosed dementia at baseline and 79 were excluded due to unreliable energy intake.

All participants who completed the home visit at baseline were re-assessed in 2013. Before the follow-up assessment, 602 participants died before the follow-up assessment, 136 were too ill to participate, 514 refused to participate, and 213 could not be contacted, leaving 4,106 participants (73.7%) to complete the assessment (Supplementary Fig. 2). In general, compared with participants who dropped out, those enrolled in the study completed the follow-up assessment were younger and had a higher education, greater social network scores, and less depression (Supplementary Table 1). The median time from baseline to follow-up was 6.4 years (range 4.5–11.4 years).

Written informed consent forms were provided by every participant at baseline and at follow-up. The study was approved by the institutional review board at the National Health Research Institutes and the collaborating hospitals. All procedures were performed in accordance with the relevant guidelines and regulations.

Food frequency questionnaire

All participants were asked to complete a 72-item food frequency questionnaire (FFQ) to estimate their typical daily dietary intake over the past year at baseline. The FFQ has been previously described [19]. Briefly, the original FFQ was developed for Chinese Americans and adapted to another validation study in the Taiwanese population [20, 21]. The validation of the FFQ was conducted against a 1-day recall. Correlation coefficients for nutrient intake between the two methods ranged from 0.2 for total fat to 0.7 for calcium. In addition, agreements in quartile distributions between the two methods suggested that 50% participants in the highest quartile of the FFQ were also in the highest quartile of the 1-day recall (range 33% in total fat—69% in cholesterol), while only 10% were classified into different quartiles (range 0% in total calories and phosphorus—20% in crude fiber) [20, 21]. This FFQ should provide reasonable estimates of typical intake in epidemiologic studies. Dietary intake of magnesium (g/day) was estimated based on the sum of the products of eating frequency, portion size, and energy and nutrient content for each food in the Taiwan Food Composition Tables (March 2017). Participants with energy intake > 5000 kcal/day for men and > 4500 kcal/day for women or < 500 kcal/day for both men and women [20, 21] were excluded because these intake levels were considered to be over- or under-reported (n = 79).

Outcome measures

Three cognitive tests were administered in the HALST study at both baseline and follow-up: Mini-Mental Status Examination (MMSE), Digit Symbol Substitution Test (DSST), and Clock-Drawing Test (CDT). The MMSE score ranges from 0 to 30 and is commonly used in primary care and research settings to screen cognitive impairment in older adults. The score has been shown to be sensitive in detecting moderate-to-severe cognitive impairment [22]. Due to the educational and incomplete effects of the MMSE, the lower cutoff were set separately for those with incompletion and illiteracy [23]. For example, if a participants answered 29 potential points, the cutoff was set to 23, instead of 24; if a participant answered 29 potential points and was illiterate, the cutoff was set to 21. DSST is a polyfactorial test that assesses motor speed, attention, visual perceptual functions, and associative learning (executive functions of planning and strategizing). It is a sensitive measure of impairment, but has low specificity for determining exactly which cognitive domain has suffered the impairment [24]. The DSST score is the total number of correctly matched number-symbol pairs within 2 min, ranging from 0 to 133. CDT is also widely used as a cognitive screening instrument for the diagnosis of dementia [25]. In this study, the 5-point Shulman scoring system was used [26, 27]. Cognitive impairment or low cognitive function is defined as MMSE < 24 [23], DSST < 21 (the lower 20% at baseline assessment), CDT < 3 [27], or any two impairments of the three tests.

Measurement of covariates

A number of covariates including age, education level (low literacy, primary school, or more than primary school), smoking status (never, former, current), alcohol drinking (never, former, current), physical activity (low, medium, and high levels), body mass index ((BMI), weight (kg)/height2 (m)), social networking (0–5, 6–7, ≥ 8), CES-D scores (< 16 or \(\ge\) 16), history of diabetes and stroke (no, yes), and use of multivitamin (no, yes) [28] were considered potential confounders based on their known associations with magnesium and cognitive impairment/dementia. The study center was treated as a surrogate measurement of urbanization. Most of the covariates were self-reported, except height and weight, which were measured during the physical examination by the trained interviewers. Because of the biological interactions among magnesium, calcium, and vitamin D, plasma 25(OH)D levels and calcium intake were included as covariates to assess the independent association between magnesium intake and cognitive function. Due to the strong correlation between magnesium and calcium intake (correlation coefficient: 0.88) in the current population, serum free calcium (Ca2+) was adjusted, instead. However, the results were not materially different; thus, dietary calcium intake and serum Ca2+ were not included in the final model. Plasma vitamin D measurement and calibration have been previously described [29]. Briefly, the initial plasma 25(OH)D level was measured with an enzyme immunoassay (OCTEIA 25-Hydroxy Vitamin D EIA Kit, Immunodiagnostic Systems Inc., Mountain Lakes, NJ, USA) and then calibrated to Liason chemiluminescence analyzer (DiaSorin, Saluggia, Italy) measurements to correct for the measurement errors. Serum levels of Ca2+ were measured with an Ion selective electrode (Roche AVL 9180, Roche, Basel, Switzerland).

Statistical analysis

Dietary magnesium intake was categorized into quartiles based on the distributions among men and women included in current study. Participants’ characteristics were described by magnesium quartile at baseline and compared using the chi-square test for categorical variables and the Kruskal–Wallis test for continuous variables.

To better understand the shape of the association between magnesium intake and cognitive function status and whether magnesium intake would be associated with changes in cognitive function status, we conduced cross-sectional and longitudinal analyses and treating the magnesium intake data as categorical and continuous variable. The cross-sectional associations of magnesium intake with cognitive function status were examined using logistical regression models, and the lowest category of magnesium intake was treated as the reference. The dose–response relationship was estimated by fitting models with the continuous magnesium intake and interpreting the p-value as the p-trend. To determine whether baseline magnesium intake was associated with a change in cognitive status (e.g., normal to impairment), we performed longitudinal analyses by excluding participants with impaired cognitive test scores at baseline. Because men and women tend to have different dietary magnesium intakes and there are sex/gender disparities in cognitive decline and dementia risk, for example, women have higher risk than men [30], stratified analyses were conducted by sex to examine the role of sex as possible modifier of the magnesium-cognition association. Multiplicative interactions between magnesium intake and sex or plasma vitamin D status were tested using the Wald test. All models were adjusted for the covariates list above. P < 0.05 was considered statistically significant.

Analyses were performed using SAS statistical software (SAS Institute, Cary, NC, USA).

Results

The characteristics of the study sample by baseline magnesium intake are presented for men and women in Table 1. Overall, participants with lower magnesium intake tended to be older and have less education than those with higher intake. Participants with lower magnesium intake were also more likely to be a never drinker, physically inactive, have lower intakes of total energy and calcium, and higher plasma 25(OH)D levels.

Table 1 Baseline participant characteristics by magnesium intake

Logistic regression models investigating cross-sectional associations between baseline magnesium intake and cognitive function status are presented in Table 2. At baseline, magnesium intake was nonlinearly associated with low MMSE score, with the strongest associations observed in the 3rd quartile of intake (vs. 1st quartile in model 2, odds ratio [OR] = 0.57, 95% confidence interval [CI] = 0.34–0.96 in men and OR = 0.61, 95% CI = 0.43–0.88 in women). In addition, increased magnesium intake was associated with lower odds of a poor performance on the DSST in a linear fashion in men (compared with the 1st quartile: OR = 0.61, 95% CI = 0.39–0.94 for the 2nd; OR = 0.56, 95% CI = 0.34–0.93 for the 3rd; and OR = 0.54, 95% CI = 0.30–0.99 for the 4th quartiles, ptrend = 0.01). However, magnesium intake was not associated with a low CDT score.

Table 2 Cross-sectional associations of magnesium intake with cognitive performance at baseline

The cross-sectional associations of baseline magnesium intake and cognitive scores were further stratified by baseline plasma 25(OH)D levels (Table 3). The associations between magnesium intake and MMSE and DSST status were more evident in men with sufficient vitamin D status, whereas the associations were imprecise in men with insufficient vitamin D status. Moreover, the cross-sectional associations between magnesium intake and poor performance on the MMSE in women were comparable in participants with sufficient and insufficient vitamin D status.

Table 3 Cross-sectional associations of magnesium intake with cognitive performance stratified by vitamin D status at baseline

In addition, the longitudinal associations of magnesium intake with changes in cognitive function status (e.g., normal to impairment) were evaluated in men and women with normal baseline cognitive scores (Table 4). Compared to men in the lowest quartile of magnesium intake, men with higher intake had a lower odds of a poor performance on the MMSE at follow-up (4th vs. 1st quartile: OR = 0.43, 95% CI = 0.23–0.82, ptrend < 0.01) and DSST (4th vs. 1st quartile: OR = 0.23, 95% CI = 0.09–0.61, ptrend < 0.01). In women, higher intake of magnesium intake was also associated with lower odds of developing MMSE impairment, although the trend was not statistically significant (4th vs. 1st quartile: OR = 0.53, 95% CI = 0.29–0.97, ptrend = 0.12).

Table 4 Longitudinal associations of magnesium intake with changes in cognitive function status (normal to impairment at follow-up) among baseline cognitive normal participants

Additional stratified analyses of the longitudinal associations of magnesium intake with change in cognitive function status were conducted by baseline vitamin D status (Table 5). Inverse associations between baseline magnesium intake and odds of a poor performance on the MMSE and DSST at follow-up were observed in men regardless of vitamin D status. The associations between baseline magnesium intake and cognitive impairments at follow-up stratified by vitamin D status were not evident in women.

Table 5 Longitudinal associations of magnesium intake with change in cognitive function status (normal at baseline to impairment at follow-up) by vitamin D status1

Discussion

Our study confirmed previous findings that higher magnesium intake was cross-sectionally associated with a lower odds of a poor performance on the MMSE and DSST [13, 14]. Such an association appeared stronger among males with a sufficient vitamin D status. Moreover, our longitudinal analyses supported the hypothesis that higher magnesium intake was associated with a lower odds of a poor performance on the MMSE and DSST after a median of 6-year follow-up among participants with normal baseline MMSE and DSST status, respectively.

Magnesium is important in maintaining the homeostasis of the brain, including coordinating the neurochemical transmission and preserving the integrity of the blood–brain barrier [31, 32]. Although not clear yet, magnesium had been suggested to accelerate toxin clearance, reduce neuroinflammation, inhibit amyloid precursor processing and abnormal tau protein phosphorylation, and reverse NMDA receptors deregulation [32,33,34]. Vitamin D increased magnesium absorption and retention in animal models [35, 36]; this might explain why the effect of magnesium was more apparent when vitamin D was sufficient (Tables 3 and 5). Furthermore, magnesium had been associated with several chronic diseases, such as stroke and diabetes [28, 33], which are also risk factors for dementia. Higher magnesium intake might modify the risk of cognitive decline by mediating the cardiometabolic risk factors. Nevertheless, it is also likely that those with higher magnesium intake also had healthier lifestyle (low rate of smoking and drinking) and better health conscious (higher education) (Table 1), although we had adjusted these variables in the statistical models.

Our results were generally consistent with those from the NHANES, but not the results in subgroups. The inconsistent results in subgroup analyses between our study and those from the NHANES may be due to the demographic and/or biologic differences of the two study populations. As previously reported, our population had much higher magnesium intake than the United States population [10,11,12]; the highest quartile of magnesium intake in the NHANES [13, 14] was similar to that of the 3rd quartile in our study. In addition, we only included dietary magnesium intake in the current study, instead of the total intake from diet and supplement. Second, vitamin D insufficiency was relatively infrequent in our population (22% in men and 35% in women [29]); hence, the statistical estimates in the vitamin D insufficient group were imprecise. In particular, the factors associated with vitamin D insufficiency in our population seemed to be related to better socioeconomic status (e.g., higher education, no work-related physical activity, or higher fruit and vegetable intake) [29]. Therefore, another possible explanation is that the inverse associations with magnesium intake could be the result of a healthy lifestyle effect; those with higher education and healthier lifestyles and behaviors are more likely to have better cognitive function. Additional studies are necessary to confirm this association and assess whether vitamin D status modifies the magnesium–cognition association in East Asian populations.

Several prospective cohort studies conducted in different populations have indicated that magnesium intake may impact risk of cognitive impairment and dementia, but the results have been inconsistent [15, 17, 38,39,40]. Many of previous studies did not address the concerns of confounding by other nutrients or total energy intake In the present longitudinal analyses, we adjusted the total energy intake, multivitamin supplement use (Model 1), serum vitamin D (Model 2), dietary calcium intake (Model 3), serum Ca2+ level (Model 4) and other potential confounders, making it a strength of our study. Our study further showed a strong correlation between dietary magnesium and calcium intake. Adjusted for dietary calcium intake changed the point estimates substantially (Model 3), suggesting a potential collinearity effects in our study. Many Asian populations do not consume as much milk and dairy products as European and US populations do [42], and some vegetables do contain high levels of calcium albeit their bioavailability is low [43]. The Hisayama study in Japan reported an inverse association between high magnesium intake and risk of all-cause dementia [16, 41], but calcium intake was not adjusted in the analysis. A recent study conducted in Shanghai showed a significant association between the highest tertile of magnesium intake and increased risk of dementia (hazard ratio = 2.26, 95% CI 1.02–5.00) after controlling for dietary calcium intake [15]; however, the correlation between dietary magnesium and calcium intake was unknown for this study. Nevertheless, the potential interaction of dietary magnesium and calcium intake is not within the scope of the current study. Results from the Women’s Health Initiative Memory Study showed that women in quintiles Q2–Q5 of total magnesium intake had a lower risk of MCI compared with those in the lowest quintile after multivariate adjustments including total intake of vitamin D, while no association was detected between dietary magnesium intake and risk of MCI [40], suggesting magnesium intake from supplement may also play a role.

In our longitudinal study, an independent association was detected between higher baseline dietary magnesium intake and lower odds of a poor performance on the MMSE and DSST after a median follow-up of 6–years. Together with previous longitudinal studies [16, 38, 40], our results support that high dietary magnesium intake is associated with lower odds of reduction in cognitive scores, which might lead to the subsequent development of dementia.

None of the previous cohort studies evaluated the potential modifying effect of serum vitamin D status. Our longitudinal analyses showed an inverse association between higher dietary magnesium intake and lower odds of a poor performance on the MMSE among men with sufficient vitamin D status. Animal and human studies have shown that higher serum vitamin D level can increase magnesium absorption and retention [35, 36]; on the other hand, optimal magnesium status can influence serum vitamin D status and metabolism [44]. These results suggest that high magnesium intake is beneficial for preventing cognitive decline when vitamin D status is sufficient. Thus, high magnesium intake and sufficient serum vitamin D may have beneficial effects on general cognition and prevent cognitive decline, particular among men. More studies including experimental studies are needed to confirm our findings and understand the underlying mechanisms.

This study had some limitations. First, there may have been response bias and measurement errors, such as overreporting, in the FFQ [45]. Such error can also be seen in participants who already presented cognitive impairment and the bias can be both under and overreporting. However, we have excluded participants with abnormal test scores at baseline in the longitudinal analyses and the follow-up examinations were conducted independent of their baseline measurements; hence, the bias would be toward the null. In general, the FFQ has good reproducibility and reasonable validity for most, but not all nutrients in older adults [46]. Second, although we excluded participants with a dementia diagnosis, we cannot exclude the possibility that people with subclinical dementia were included in the study. Third, although we adjusted for known risk factors of cognitive impairment, there may have been residual confounding due to unmeasured variables, such as medications containing MgO, which is usually used to treat constipation, which was suggested to be associated with cognitive aging and decline [47].

Nevertheless, our study also had several strengths. First, the relatively large population of community-dwelling participants and detailed data on education levels, lifestyles, such as smoking and drinking behaviors, comorbidities, medications, depression, and social network enabled us to explore associations more accurately. Second, MMSE, DSST, and CDT have their own strengths and limitations, respectively. For example, the MMSE is sensitive in detecting moderate-to-severe cognitive impairment; however, it is not sensitive enough to detect mild cognitive decline and may be subject to culture and language influences [22]. On the contrary, CDT can be used in people with hearing impairment, low education, and non-English speakers, but it is also not sensitive for screening mild cognitive impairment [48]. DSST is also less affected by language, culture, and education, and has high sensitivity in detecting impairment, but it has low specificity in accurately determining which cognitive domain is impaired [24]. The use of MMSE, DSST, and CDT simultaneously helped improve the assessment of cognitive performance. Finally, the longitudinal design provided us a unique opportunity to explore the change in cognitive function over time in relation to magnesium intake. All participants were followed with the same protocol during the follow-up assessments, thus reducing detection bias.

In summary, our study confirmed that higher magnesium intake was associated with higher odds of a poor performance on the MMSE and DSST in men in a median follow-up period of 6 years. Long-term clinical trials of magnesium and vitamin D are warranted to confirm our observation.