All published articles of this journal are available on ScienceDirect.
Vitamin D Deficiency and Mood Disorders among Female Patients with Systemic Lupus Erythematosus: An Electronic Health Record Study
Abstract
Background
Systemic Lupus Erythematosus (SLE) is a chronic autoimmune disease with multisystem involvement and significant psychiatric comorbidity, including anxiety and depression. Vitamin D, beyond its role in calcium homeostasis, has immunomodulatory and neuropsychiatric effects. Prior research suggests a potential link between vitamin D deficiency and mood disorders, particularly in chronic inflammatory conditions such as SLE. This study investigates the association between vitamin D deficiency and the development of anxiety and depression in female patients with SLE.
Methods
Using the TriNetX platform, a multi-institutional electronic health record database, we identified female SLE patients aged 18–52 with and without vitamin D deficiency. Individuals with prior diagnoses of anxiety or depression before SLE onset were excluded. Cohorts were propensity score–matched by age, race, and ethnicity (n = 6,823). The primary outcomes were incident diagnoses of anxiety-related disorders and depressive episodes following SLE diagnosis. Statistical analyses included logistic regression to estimate odds ratios (ORs) and Cox proportional hazards models to calculate hazard ratios (HRs). Scaled Schoenfeld residuals were used to evaluate the proportional hazards assumption.
Results
Each cohort included 6,823 patients. Demographics were well-balanced across cohorts. Patients with vitamin D deficiency had significantly higher odds of anxiety (OR 0.464; 95% CI, 0.411–0.523) and depression (OR 0.517; 95% CI, 0.446–0.599) compared to those without deficiency. Time-to-event analysis showed reduced risk of developing anxiety (HR 0.605; 95% CI, 0.539-0.679) and depression (HR 0.592; 95% CI, 0.513-0.684) in the vitamin D sufficient group.
Discussion
Our findings demonstrate that vitamin D deficiency is associated with a significantly higher prevalence of anxiety and depression in women with SLE. The biological plausibility for this relationship is supported by vitamin D’s immunomodulatory and neuroprotective effects, including its role in suppressing pro-inflammatory cytokines such as IL-6 and TNF-α, modulating microglial activity, and enhancing serotonergic function. These mechanisms may be especially relevant in SLE, a condition already marked by chronic systemic inflammation and cytokine dysregulation.
Conclusion
Vitamin D deficiency appears to be significantly associated with increased odds and the time to development of anxiety and depression in SLE patients. However, its predictive role over time remains uncertain. These findings highlight the potential value of vitamin D as a modifiable factor in the mental health management of autoimmune diseases. Future prospective studies and randomized controlled trials are warranted to evaluate causality and the therapeutic benefit of vitamin D supplementation in this population.
1. INTRODUCTION
Systemic Lupus Erythematosus (SLE) is a chronic, multi-system autoimmune disease characterized by dysregulation of both the innate and adaptive immune systems. This immune dysfunction leads to widespread inflammation, tissue damage, and progressive organ involvement [1].
The disease process is primarily driven by the loss of immunological tolerance, resulting in the production of autoantibodies targeting nuclear and cytoplasmic antigens. A hallmark of SLE pathophysiology is the formation and deposition of immune complexes, which trigger Type III hypersensitivity reactions, activation of the complement cascade, and recruitment of neutrophils, culminating in both localized and systemic tissue injury [2]. The pathogenesis also involves the overproduction of pro-inflammatory cytokines, notably type I interferons, which amplify autoimmunity by enhancing antigen presentation and B-cell activation [2]. These complex immunological events underlie the heterogeneous clinical manifestations of the disease.
According to the Centers for Disease Control and Prevention, approximately 204,000 individuals in the United States are affected by SLE [3]. The condition disproportionately impacts women of reproductive age, with the highest prevalence observed among Black and Hispanic women, followed by White and Asian women [4, 5]. The clinical presentation of SLE is highly variable and may include nonspecific symptoms such as fatigue and malaise, musculoskeletal complaints including arthralgia and fractures, and mucocutaneous manifestations such as photosensitive rashes and oral ulcers [2]. Due to its unpredictable disease course, multi-organ involvement, and frequent relapses, SLE significantly impairs health-related quality of life.
Psychiatric manifestations, particularly depression and anxiety, are significantly more prevalent among individuals with SLE compared to the general population [6]. These neuropsychiatric symptoms are not merely secondary to chronic illness, but may be intrinsically linked to the disease’s underlying inflammatory and immunological processes. SLE-related immune dysregulation, particularly the elevation of pro-inflammatory cytokines such as interleukin-6 (IL-6) and type I interferons, has been implicated in the development of mood disorders by affecting central nervous system signaling, brain morphology, and neuroinflammation [7-9].
In a study assessing physiological, clinical, and psychosocial outcomes in patients with chronic inflammatory diseases, individuals with SLE were found to have a six-fold higher prevalence of depression compared to healthy controls [10]. The study further identified that SLE patients exhibited significantly elevated levels of IL-6, pain scores, and poorer sleep quality. These factors can contribute to the heightened risk of psychiatric comorbidities. Addressing mental health as an integral component of SLE care is therefore essential to improving both clinical outcomes and overall quality of life.
Vitamin D, traditionally recognized for its role in calcium homeostasis and bone metabolism, has increasingly been implicated in immune regulation and neuropsychiatric function. Notably, vitamin D has demonstrated anti-inflammatory and immunomodulatory effects, acting through vitamin D receptors expressed on immune cells such as dendritic cells, macrophages, and T lymphocytes [11]. Through modulation of cytokine profiles, particularly by suppressing pro-inflammatory cytokines like IL-6 and TNF-α and enhancing anti-inflammatory mediators, vitamin D plays a protective role against autoimmune and chronic inflammatory diseases [11].
A comprehensive meta-analysis of 34 case-control studies found that individuals with SLE had significantly lower serum vitamin D levels compared to healthy controls [12]. This association suggests that vitamin D deficiency may not only be a consequence of chronic illness and reduced sun exposure but may also contribute to immune dysregulation and disease activity in SLE. Some studies have even suggested an inverse relationship between vitamin D levels and SLE disease activity indices, implying a potential therapeutic role for supplementation. In a randomized controlled trial, patients with low vitamin D levels who received daily supplementation for six months showed significant improvement in anxiety scale ratings compared to those in the placebo group [13].
Emerging genetic epidemiology studies provide additional support for vitamin D’s involvement in both SLE and neuropsychiatric outcomes. For example, a Mendelian randomization study identified specific single-nucleotide polymorphisms (SNPs) associated with lower serum levels of 25-hydroxyvitamin D [25(OH)D], and found that individuals carrying these variants had a significantly increased risk of developing multiple sclerosis (MS). Although the study focused on MS, it offers strong genetic evidence that vitamin D deficiency may play a causal role in immune-mediated neuroinflammatory diseases. These findings support the plausibility that similar SNP-mediated pathways may contribute to psychiatric comorbidities in SLE, such as depression and anxiety, through shared mechanisms of neuroinflammation and immune dysregulation [14]
Given the prevalence of depression and anxiety in individuals with SLE and the frequent co-occurrence of vitamin D deficiency, these intersecting pathways warrant further study. This study seeks to further investigate the relationship between vitamin D deficiency and psychiatric symptoms in SLE patients.
2. METHODS
2.1. Platform
Data were obtained from TriNetX, a global, real-world data and analytics platform that aggregates de-identified electronic health records from 95 participating healthcare organizations across the United States, encompassing over 31 million patient records. The platform utilizes standardized coding systems such as ICD-10, ATC, and CPT to ensure consistency and interoperability across data sources. Institutional Review Board (IRB) approval was not required for this study due to the use of de-identified data. However, all study authors completed training through the Collaborative Institutional Training Initiative (CITI) program and were IRB-certified through Tower Health Hospital.
2.2. Cohort Design
This study included only female participants aged 18 to 52 years. This age range was selected to exclude pediatric and postmenopausal individuals, as both groups exhibit significant variability in vitamin D levels. According to the National Institute on Aging, the average age of menopause in the U.S. is 52. All participants had a confirmed diagnosis of systemic lupus erythematosus (SLE), defined by ICD-10 code M32.1.
Cohort 1 consisted of SLE patients without a diagnosis of vitamin D deficiency (ICD-10 E55.9). To control for mental health history, we excluded individuals with any prior diagnosis of anxiety or anxiety-related disorders (ICD-10 F40–F48) or depressive episodes (ICD-10 F32) before the onset of SLE. There were 20,054 patients in cohort 1 before propensity score matching and 6,823 patients after matching.
Cohort 2 included SLE patients with vitamin D deficiency, also with no prior history of anxiety, anxiety-related disorders, or depression. Temporal relationships were carefully established to ensure that diagnoses of anxiety or depression did not precede the diagnoses of SLE and vitamin D deficiency. There were 6,823 patients in cohort 2 before matching and 6,823 patients after matching.
Patients were propensity score-matched for age at index, ethnicity, and race to balance demographic characteristics between cohorts. The time window of analysis was 5 years (Fig. 1).

Flowchart depicting the study design for evaluating the association between vitamin D deficiency and the development of anxiety and depression in women with SLE.
2.3. Analysis and Outcomes
Descriptive statistics were used to summarize baseline characteristics of the study population. Continuous variables were presented as means with standard deviations, while categorical variables were expressed as counts and percentages. Chi-square tests and t-tests were performed to assess differences between Cohort 1 (SLE without vitamin D deficiency) and Cohort 2 (SLE with vitamin D deficiency).
The primary outcomes of interest were the development of anxiety-related disorders and depressive episodes following the diagnosis of SLE. To evaluate the association between vitamin D deficiency and these outcomes, logistic regression models were used to calculate odds ratios (OR) with 95% confidence intervals.
Using R’s survival package, time-to-event analysis was conducted using Cox proportional hazards regression models to estimate hazard ratios (HR) for the onset of anxiety or depression after the diagnosis of SLE. To assess proportionality, the scaled Schoenfeld residual was used to assess whether the HR varies with time. All analyses were conducted using the TriNetX built-in analytics platform. The Cox model was used to assess the hazard ratio, or relative risk over time, and the validity of the proportional hazards assumption was checked using Schoenfeld residuals via reporting of p-value and chi-squared.
The calculated power for both the OR and HR in this study is 1.0 (or 100%). This indicates that the study has more than sufficient power to detect a meaningful effect, assuming a moderate effect size (OR and HR ~0.6), a sample size of 6,823, and an alpha level of 0.05.
3. RESULTS
The mean age at index for both groups is similar, with a mean of 34.1 years for both. There is no statistically significant p<0.05 difference in ethnicity or race. The post-matching cohort size was 6823 (Table 1).
We compared those with normal vitamin D levels (Cohort 1) and those with vitamin D deficiency (Cohort 2). Odds ratios (OR) and 95% confidence intervals (CI) were calculated to assess the likelihood of having these mental health outcomes at a single point in time. Patients with normal vitamin D levels were 53.6% less likely to have anxiety and 48.3% less likely to have depression at a point in time compared to those with vitamin D deficiency (Table 2).
This table presents results from a Cox proportional hazards analysis assessing the relationship between vitamin D status and the development of anxiety and depression. The hazard ratios for anxiety (0.605) and depression (0.592) are both less than 1, indicating that individuals with sufficient vitamin D had a lower risk of developing these conditions over time compared to those who were deficient. The 95% confidence intervals do not cross 1.0, suggesting a potentially meaningful association. To ensure the validity of these hazard ratios, the proportional hazards assumption must hold, meaning the relative risk between groups remains constant over time. This assumption was tested using Schoenfeld residuals, with p-values of 0.397 (anxiety) and 0.208 (depression). Since both p-values are greater than 0.05, we fail to reject the null hypothesis that hazards are proportional. Thus, the model appears valid, and the hazard ratios can be interpreted as consistent over time (Table 3).
Variable | Normal Level of Vitamin D (Cohort 1) | Vitamin D Deficient (Cohort 2) | % of Cohort 1 | % of Cohort 2 | P-Value | Std Diff |
---|---|---|---|---|---|---|
Age at Index (Mean ± SD) | 34.1 ± 9.0 | 34.1 ± 8.9 | 100% | 100% | 0.997 | <0.001 |
White | 2,825 | 2,792 | 41.4% | 40.9% | 0.566 | 0.010 |
American Indian or Alaska Native | 37 | 47 | 0.5% | 0.7% | 0.274 | 0.019 |
Unknown Race | 720 | 713 | 10.6% | 10.4% | 0.845 | 0.003 |
Native Hawaiian or Other Pacific Islander | 30 | 41 | 0.4% | 0.6% | 0.191 | 0.022 |
Unknown Ethnicity | 1,134 | 1,130 | 16.6% | 16.6% | 0.927 | 0.002 |
Not Hispanic or Latino | 4,483 | 4,488 | 65.7% | 65.8% | 0.928 | 0.002 |
Hispanic or Latino | 1,206 | 1,205 | 17.7% | 17.7% | 0.982 | <0.001 |
Black or African American | 2,341 | 2,331 | 34.3% | 34.2% | 0.857 | 0.003 |
Other Race | 450 | 470 | 6.6% | 6.9% | 0.495 | 0.012 |
Asian | 420 | 429 | 6.2% | 6.3% | 0.750 | 0.005 |
Outcome | Cohort | Patients in Cohort | Patients with Outcome | Odds ratio (95% CI) |
---|---|---|---|---|
Anxiety | 1 | 6823 | 435 | 0.464 (0.411, 0.523) |
2 | 6823 | 874 | ||
Depression | 1 | 6823 | 284 | 0.517(0.446, 0.599) |
2 | 6823 | 529 |
Outcome | Hazard Ratio (95% CI) | X2 | df | p |
---|---|---|---|---|
Anxiety | 0.605 (0.539,0.679) | 0.718 | 1 | 0.397 |
Depression | 0.592 (0.513,0.684) | 1.582 | 1 | 0.208 |
4. DISCUSSION
This study examined the association between vitamin D deficiency and the prevalence of anxiety and depression in patients with SLE. Our findings indicated that SLE patients with vitamin D deficiency had significantly higher odds of both anxiety and depression, suggesting a potential link between vitamin D status and psychiatric comorbidities in this population. Additionally, the time-to-event analysis did show statistically significant differences in the risk of developing anxiety or depression over time. Given vitamin D’s role in modulating immune and neurochemical pathways relevant to psychiatric function, these findings support a plausible association between vitamin D deficiency and mood disorder prevalence in chronic inflammatory states such as SLE.
On a cellular level, vitamin D has been shown to exert several neuroprotective effects through its interaction with the vitamin D receptor (VDR) in the CNS [15]. In mouse microglial cell lines, vitamin D inhibited the release of proinflammatory cytokines, including TNF-α, IL-6, and nitric oxide [16]. VDR activation also reduced expression of MHC class II molecules and B7 costimulatory receptor, thus decreasing microglial activation [16]. Additionally, vitamin D has been shown to modulate antigen-presenting dendritic cell activity, downregulate MHC class II and costimulatory molecules (B7, CD40, CD80), reduce IL-12 production, and promote anti-inflammatory cytokine IL-10 [17, 18]. These mechanisms may support the hypothesis that vitamin D deficiency can contribute to the pathogenesis of anxiety and depression in neuroinflammation.
Further, several studies have cited the ability of vitamin D to cross the blood-brain barrier and act directly on the CNS through VDR located in the brain. Using immunohistochemical staining on post-mortem human brain tissue, one study found that both CDR and 1α-hydroxylase, which converts inactive vitamin D to its active form, are widely distributed in the brain, including the prefrontal cortex, hippocampus, hypothalamus, and substantia nigra, areas involved in emotion regulation and cognitive processing [19, 20]. Another review article reiterated this finding, along with discussing the genomic and non-genomic mechanisms of vitamin D on brain function, which include regulating changes in intracellular calcium, secondary messenger system, NT synthesis, and anti-inflammatory pathways, among others [20]. These findings demonstrate growing evidence linking vitamin D to psychiatric.
The adaptive immune system is also impacted by vitamin D. The Th1 subset of CD4+ T cells is preferentially suppressed by inhibition of IL-2 and IFN-γ production, and similarly reduced IL-2 cytokines from monocytes [21]. In B lymphocytes, vitamin D can directly inhibit B cell proliferation, plasma cell differentiation, immunoglobulin production, and generation of class-switched memory B cells [22]. In addition, mouse models have shown that vitamin D supplementation can inhibit natural killer cell activity [23]. Vitamin D’s immunomodulatory actions could be considered to reduce autoimmune-driven inflammation in SLE, which in turn could mitigate the neuroinflammation associated with depression and anxiety.
The inverse relationship between low vitamin D and anxiety/depression has been documented across several studies [24, 25]. In depression, vitamin D has been implicated in enhancing serotonin synthesis and regulating intracellular calcium signaling [26]. A meta-analysis of 25 studies found that vitamin D supplementation may alleviate depressive symptoms in patients with major depressive disorder [27]. In anxiety, findings have been more variable; however, a randomized clinical study found vitamin D supplementation for 6 months significantly improved anxiety symptoms in individuals who have low vitamin D levels [13]. These findings further support a potential capacity for vitamin D to modulate psychiatric symptoms. However, additional research is needed to clarify causality.
One limitation of using TriNetX for psychiatric research is the reliance on electronic health record data, which may be incomplete, inconsistently coded, or missing key clinical details. Due to the nature of the platform, individual patient vitamin D levels could not be directly accessed, and analyses were instead based on ICD-10 coding for vitamin D deficiency. Additionally, important covariates such as disease activity, medication use, and socioeconomic status could not be included in the regression models, as these variables are not reliably captured or accessible in the TriNetX platform. This limits the ability to account for potential confounders that may influence psychiatric outcomes fully. Furthermore, the dependence on EHR data restricts control over coding quality and prevents assessment of symptom severity, duration, and uncoded psychiatric manifestations. Nonetheless, we believe the large, diverse cohort enabled by this platform remains a key strength of the study, supporting broad generalizability and allowing for the detection of associations that may not be evident in smaller datasets. Ultimately, this study demonstrates that while vitamin D deficiency is associated with mood disorder prevalence in SLE patients, its predictive value of future development of anxiety and depression warrants further investigation through prospective studies.
CONCLUSION
This study contributes to the growing literature suggesting an association between vitamin D deficiency and psychiatric comorbidities in patients with SLE. We observed significantly higher odds of anxiety and depression in vitamin D-deficient individuals, and time-to-event analyses did demonstrate statistically significant differences in risk over time. Future research should include randomized controlled trials to evaluate the efficacy of vitamin D supplementation, as well as longitudinal studies to clarify causality. Exploring optimal vitamin D levels, stratifying by SLE subgroups (e.g., age, sex, disease severity, and treatment regimens), and incorporating biomarkers of inflammation or neuroimmunology may help elucidate underlying mechanisms and inform the development of personalized treatment strategies.
AUTHORS’ CONTRIBUTIONS
The authors confirm their contribution to the paper as follows: A.D.: Conceived, developed, analyzed, and interpreted the results of the project. J.W.: Assisted with writing the manuscript and interpretation of results. E.E.: Supervised the project. All authors reviewed the results and approved the final version of the manuscript.
LIST OF ABBREVIATIONS
SLE | = Systemic lupus erythematous |
OR | = Odds ratio |
HR | = hazard ratio |
IL | = Interleukin |
TNF | = Tumor necrosis factor |
VDR | = vitamin D receptor |
AVAILABILITY OF DATA AND MATERIALS
TriNetX users and/or participating health care organizations have open access to the data.
ACKNOWLEDGEMENTS
Declared none.